Merge pull request #22808 from colemanw/searchKitMailingTask
[civicrm-core.git] / Civi / Core / Event / PostEvent.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
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 |
9 +--------------------------------------------------------------------+
10 */
11
12 namespace Civi\Core\Event;
13
14 /**
15 * Class AuthorizeEvent
16 * @package Civi\API\Event
17 */
18 class PostEvent extends GenericHookEvent {
19
20 /**
21 * One of: 'create'|'edit'|'delete'
22 *
23 * @var string
24 */
25 public $action;
26
27 /**
28 * @var string
29 */
30 public $entity;
31
32 /**
33 * @var int|null
34 */
35 public $id;
36
37 /**
38 * @var Object
39 */
40 public $object;
41
42 /**
43 * Class constructor
44 *
45 * @param string $action
46 * @param string $entity
47 * @param int $id
48 * @param object $object
49 */
50 public function __construct($action, $entity, $id, &$object) {
51 $this->action = $action;
52 $this->entity = $entity;
53 $this->id = $id;
54 $this->object = &$object;
55 }
56
57 /**
58 * @inheritDoc
59 */
60 public function getHookValues() {
61 return [$this->action, $this->entity, $this->id, &$this->object];
62 }
63
64 }