35 $this->
value = $value;
36 $this->params = $params;
69 $this->
value = $value;
83 if (!is_array($this->params)) {
87 return array_key_exists(
$key, $this->params) ? $this->params[
$key] :
$default;
94 if (isset($this->params[
'entity']) && $this->params[
'entity'] instanceof \
ElggEntity) {
95 return $this->params[
'entity'];
105 if (isset($this->params[
'user']) && $this->params[
'user'] instanceof \
ElggUser) {
106 return $this->params[
'user'];
getType()
{Get the type of the hook.string}
setValue($value)
Update the value.
getValue()
{Get the current value of the hook.mixed}
getParam($key, $default=null)
{Get an element of the params array.If the params array is not an array, the default will always be r...
elgg()
{Get the DI container.PublicContainer}
getName()
{Get the name of the hook.string}
Models an event passed to hook handlers.
getParams()
{Get the parameters passed to the trigger call.mixed}
The object passed to invokable class name handlers.
getEntityParam()
{Gets the "entity" key from the params if it holds an Elgg entity.|null}
if($container instanceof ElggGroup &&$container->guid!=elgg_get_page_owner_guid()) $key
getUserParam()
{Gets the "user" key from the params if it holds an Elgg user.|null}
__construct(PublicContainer $dic, $name, $type, $value, $params)
Constructor.