Elgg  Version 4.3
MemberPermissionsHandler.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Groups;
4 
11 
19  public function __invoke(\Elgg\Hook $hook) {
20 
21  $container = $hook->getParam('container');
22  if (!$container instanceof \ElggGroup) {
23  return;
24  }
25 
26  $user = $hook->getUserParam();
27  if (!$user instanceof \ElggUser) {
28  return;
29  }
30 
31  if ($container->isMember($user)) {
32  return true;
33  }
34  }
35 }
__invoke(\Elgg\Hook $hook)
Allow group members to write to the group container.
Check if content can be created in a group based on group membership of a user.
Models an event passed to hook handlers.
Definition: Hook.php:11
$user
Definition: ban.php:7
$container
Definition: delete.php:23