Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. CalculatedPermissionsItemInterface.php

interface CalculatedPermissionsItemInterface

Defines the calculated permissions item interface.

Hierarchy

  • interface \Drupal\Core\Session\CalculatedPermissionsItemInterface

Expanded class hierarchy of CalculatedPermissionsItemInterface

All classes that implement CalculatedPermissionsItemInterface

File

core/lib/Drupal/Core/Session/CalculatedPermissionsItemInterface.php, line 8

Namespace

Drupal\Core\Session
View source
interface CalculatedPermissionsItemInterface {
    
    /**
     * Returns the scope of the calculated permissions item.
     *
     * @return string
     *   The scope name.
     */
    public function getScope() : string;
    
    /**
     * Returns the identifier within the scope.
     *
     * @return string|int
     *   The identifier.
     */
    public function getIdentifier() : string|int;
    
    /**
     * Returns the permissions for the calculated permissions item.
     *
     * @return string[]
     *   The permission names.
     */
    public function getPermissions() : array;
    
    /**
     * Returns whether this item grants admin privileges in its scope.
     *
     * @return bool
     *   Whether this item grants admin privileges.
     */
    public function isAdmin() : bool;
    
    /**
     * Returns whether this item has a given permission.
     *
     * @param string $permission
     *   The permission name.
     *
     * @return bool
     *   Whether this item has the permission.
     */
    public function hasPermission(string $permission) : bool;

}

Members

Title Sort descending Modifiers Object type Summary Overrides
CalculatedPermissionsItemInterface::getIdentifier public function Returns the identifier within the scope. 1
CalculatedPermissionsItemInterface::getPermissions public function Returns the permissions for the calculated permissions item. 1
CalculatedPermissionsItemInterface::getScope public function Returns the scope of the calculated permissions item. 1
CalculatedPermissionsItemInterface::hasPermission public function Returns whether this item has a given permission. 1
CalculatedPermissionsItemInterface::isAdmin public function Returns whether this item grants admin privileges in its scope. 1

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal