function CalculatedPermissionsItem::hasPermission
Same name in other branches
- 10 core/lib/Drupal/Core/Session/CalculatedPermissionsItem.php \Drupal\Core\Session\CalculatedPermissionsItem::hasPermission()
Overrides CalculatedPermissionsItemInterface::hasPermission
File
-
core/
lib/ Drupal/ Core/ Session/ CalculatedPermissionsItem.php, line 64
Class
- CalculatedPermissionsItem
- Represents a single entry for the calculated permissions.
Namespace
Drupal\Core\SessionCode
public function hasPermission(string $permission) : bool {
return $this->isAdmin() || in_array($permission, $this->permissions, TRUE);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.