Elgg  Version 1.10
PluginHooksService.php
Go to the documentation of this file.
1 <?php
2 namespace Elgg;
3 
16 
23  public function trigger($hook, $type, $params = null, $returnvalue = null) {
24  $hooks = $this->getOrderedHandlers($hook, $type);
25 
26  foreach ($hooks as $callback) {
27  if (!is_callable($callback)) {
28  if ($this->logger) {
29  $this->logger->warn("handler for plugin hook [$hook, $type] is not callable: "
30  . $this->describeCallable($callback));
31  }
32  continue;
33  }
34 
35  $args = array($hook, $type, $returnvalue, $params);
36  $temp_return_value = call_user_func_array($callback, $args);
37  if (!is_null($temp_return_value)) {
38  $returnvalue = $temp_return_value;
39  }
40  }
41 
42  return $returnvalue;
43  }
44 }
$args
Some servers don&#39;t allow PHP to check the rewrite, so try via AJAX.
$params
Definition: login.php:72
Save menu items.
$type
Definition: add.php:8
trigger($hook, $type, $params=null, $returnvalue=null)
Triggers a plugin hook.