function ShortcutSetAccessControlHandler::checkCreateAccess
Same name in other branches
- 9 core/modules/shortcut/src/ShortcutSetAccessControlHandler.php \Drupal\shortcut\ShortcutSetAccessControlHandler::checkCreateAccess()
- 10 core/modules/shortcut/src/ShortcutSetAccessControlHandler.php \Drupal\shortcut\ShortcutSetAccessControlHandler::checkCreateAccess()
- 11.x core/modules/shortcut/src/ShortcutSetAccessControlHandler.php \Drupal\shortcut\ShortcutSetAccessControlHandler::checkCreateAccess()
Overrides EntityAccessControlHandler::checkCreateAccess
File
-
core/
modules/ shortcut/ src/ ShortcutSetAccessControlHandler.php, line 46
Class
- ShortcutSetAccessControlHandler
- Defines the access control handler for the shortcut set entity type.
Namespace
Drupal\shortcutCode
protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
return AccessResult::allowedIfHasPermission($account, 'administer shortcuts')->orIf(AccessResult::allowedIfHasPermissions($account, [
'access shortcuts',
'customize shortcut links',
], 'AND'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.