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

Breadcrumb

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

function CalculatedPermissionsItem::__construct

Constructs a new CalculatedPermissionsItem.

Parameters

string[] $permissions: The permission names.

bool $isAdmin: (optional) Whether the item grants admin privileges.

string $scope: (optional) The scope name, defaults to 'drupal'.

string|int $identifier: (optional) The identifier within the scope, defaults to 'drupal'.

File

core/lib/Drupal/Core/Session/CalculatedPermissionsItem.php, line 24

Class

CalculatedPermissionsItem
Represents a single entry for the calculated permissions.

Namespace

Drupal\Core\Session

Code

public function __construct(array $permissions, bool $isAdmin = FALSE, string $scope = AccessPolicyInterface::SCOPE_DRUPAL, string|int $identifier = AccessPolicyInterface::SCOPE_DRUPAL) {
    $this->permissions = $isAdmin ? [] : array_unique($permissions);
}

API Navigation

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