dispatch("hook_civicrm_pre::" . $event->entity, $event); } /** * One of: 'create'|'edit'|'delete' * * @var string */ public $action; /** * @var string */ public $entity; /** * @var int|null */ public $id; /** * @var array */ public $params; /** * Class constructor. * * @param string $action * @param string $entity * @param int $id * @param array $params */ public function __construct($action, $entity, $id, &$params) { $this->action = $action; $this->entity = $entity; $this->id = $id; $this->params = &$params; } /** * @inheritDoc */ public function getHookValues() { return [$this->action, $this->entity, $this->id, &$this->params]; } }