protected function GroupMenu::updateAccess in Group Menu 8
Performs access check for the update operation.
This method is supposed to be overwritten by extending classes that do their own custom access checking.
Parameters
\Drupal\group\Entity\GroupContentInterface $group_content: The group content for which to check access.
\Drupal\Core\Session\AccountInterface $account: The user for which to check access.
Return value
\Drupal\Core\Access\AccessResultInterface The access result.
Overrides GroupContentEnablerBase::updateAccess
File
- src/
Plugin/ GroupContentEnabler/ GroupMenu.php, line 103
Class
- GroupMenu
- Provides a content enabler for nodes.
Namespace
Drupal\groupmenu\Plugin\GroupContentEnablerCode
protected function updateAccess(GroupContentInterface $group_content, AccountInterface $account) {
$group = $group_content
->getGroup();
$plugin_id = $this
->getPluginId();
return GroupAccessResult::allowedIfHasGroupPermission($group, $account, "update {$plugin_id} content");
}