Elgg  Version 4.3
AclNameHandler.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Friends;
4 
11 
19  public function __invoke(\Elgg\Hook $hook) {
20  $access_collection = $hook->getParam('access_collection');
21  if (!$access_collection instanceof \ElggAccessCollection) {
22  return;
23  }
24 
25  if ($access_collection->getSubtype() !== 'friends') {
26  return;
27  }
28 
29  return elgg_echo('access:label:friends');
30  }
31 }
Returns friends ACL name.
elgg_echo($message_key, array $args=[], $language="")
Elgg language module Functions to manage language and translations.
Definition: languages.php:18
Models an event passed to hook handlers.
Definition: Hook.php:11
__invoke(\Elgg\Hook $hook)
Return the name of a friends ACL.