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