Merge pull request #23646 from seamuslee001/improve_get_coordinates
[civicrm-core.git] / Civi / API / Event / AuthorizeEvent.php
CommitLineData
132ec342
TO
1<?php
2/*
3 +--------------------------------------------------------------------+
41498ac5 4 | Copyright CiviCRM LLC. All rights reserved. |
132ec342 5 | |
41498ac5
TO
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
132ec342 9 +--------------------------------------------------------------------+
d25dd0ee 10 */
132ec342
TO
11
12namespace Civi\API\Event;
13
70da3927
TO
14use Civi\Api4\Event\ActiveUserTrait;
15
6550386a
EM
16/**
17 * Class AuthorizeEvent
70da3927 18 *
6550386a 19 * @package Civi\API\Event
39b870b8
TO
20 *
21 * Determine whether the API request is allowed for the current user.
22 * For successful execution, at least one listener must invoke
23 * $event->authorize().
24 *
25 * Event name: 'civi.api.authorize'
6550386a 26 */
132ec342 27class AuthorizeEvent extends Event {
132ec342 28
63a2492e 29 use AuthorizedTrait;
70da3927
TO
30 use ActiveUserTrait;
31
32 public function __construct($apiProvider, $apiRequest, $apiKernel, int $userID) {
33 parent::__construct($apiProvider, $apiRequest, $apiKernel);
34 $this->setUser($userID);
35 }
96025800 36
132ec342 37}