22 static $processed_events = [];
24 if (isset($processed_events[
"{$event->getName()}.{$event->getType()}"])) {
29 $processed_events[
"{$event->getName()}.{$event->getType()}"] =
true;
37 if (empty($default_widget_info)) {
44 foreach ($default_widget_info as
$info) {
45 if (
elgg_extract(
'event_name', $info) !== $event->getName()) {
49 if (
elgg_extract(
'event_type', $info) !== $event->getType()) {
74 'subtype' =>
'widget',
76 'metadata_name' =>
'context',
86 'subtype' =>
'widget',
88 'metadata_name' =>
'context',
98 $new_widget->container_guid =
$entity->guid;
99 $new_widget->owner_guid =
$entity->guid;
elgg_call(int $flags, Closure $closure)
Calls a callable autowiring the arguments using public DI services and applying logic based on flags...
if(empty($page_owner)||$owner->guid!==$page_owner->guid) $widgets
elgg_trigger_event_results(string $event, string $type, array $params=[], $returnvalue=null)
Triggers an event where it is expected that the mixed return value could be manipulated by event call...
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
elgg_pop_context()
Removes and returns the top context string from the stack.
const ELGG_IGNORE_ACCESS
elgg_call() flags
elgg_get_entities(array $options=[])
Fetches/counts entities or performs a calculation on their properties.
elgg_count_entities(array $options=[])
Returns a count of entities.
const ELGG_ENTITIES_ANY_VALUE
Constant to request the value of a parameter be ignored in elgg_get_*() functions.
elgg_get_site_entity()
Get the current site entity.
elgg_push_context(string $context)
Push a context onto the top of the stack.
Models an event passed to event handlers.