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