Elgg  Version 4.3
RemovePublicAccessHandler.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\WalledGarden;
4 
11 
19  public function __invoke(\Elgg\Hook $hook) {
20  if (!_elgg_services()->config->walled_garden) {
21  return;
22  }
23 
24  $accesses = $hook->getValue();
25  if (isset($accesses[ACCESS_PUBLIC])) {
26  unset($accesses[ACCESS_PUBLIC]);
27  }
28  return $accesses;
29  }
30 }
Models an event passed to hook handlers.
Definition: Hook.php:11
__invoke(\Elgg\Hook $hook)
Remove public access for walled gardens.
_elgg_services()
Get the global service provider.
Definition: elgglib.php:638
const ACCESS_PUBLIC
Definition: constants.php:14
Remove public access for walled garden.