Elgg  Version 6.0
DefaultWidgetsContainerPermissionsHandler.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Widgets;
4 
11 
19  public function __invoke(\Elgg\Event $event) {
20  if ($event->getParam('subtype') !== 'widget') {
21  return;
22  }
23 
24  if (elgg_in_context('create_default_widgets')) {
25  return true;
26  }
27  }
28 }
elgg_in_context(string $context)
Check if this context exists anywhere in the stack.
Definition: context.php:78
__invoke(\Elgg\Event $event)
Overrides permissions checks when creating widgets for logged out users.
Models an event passed to event handlers.
Definition: Event.php:11