Lines Matching defs:action

19      * @var mixed|null READWRITE the results of the event action, only relevant in "_AFTER" advise
20 * event handlers may modify this if they are preventing the default action
24 /** @var bool READONLY if true, event handlers can prevent the events default action */
27 /** @var bool whether or not to carry out the default action associated with the event */
57 * properly handle correct processing of any default action and issue an
61 * // default action code block
108 * - carry out the default action using $this->data based on $enablePrevent and
112 * @param null|callable $action
115 * the value set by any <event>_before or <event> handlers if the default action is prevented
116 * or the results of the default action (as modified by <event>_after handlers)
117 * or NULL no action took place and no handler modified the value
119 public function trigger($action = null, $enablePrevent = true)
122 if (!is_callable($action)) {
124 if ($action !== null) {
126 'The default action of ' . $this .
133 if ($this->advise_before($enablePrevent) && is_callable($action)) {
134 $this->result = call_user_func_array($action, [&$this->data]);
146 * this function does not prevent the default action taking place
166 * prevent the default action taking place
174 * should the default action be executed?
190 * @param callable $action (optional, default=NULL) default action, a php callback function
191 * @param bool $canPreventDefault (optional, default=true) can hooks prevent the default action
194 * by default this is the return value of the default action however
197 public static function createAndTrigger($name, &$data, $action = null, $canPreventDefault = true)
200 return $evt->trigger($action, $canPreventDefault);