function RefinableCalculatedPermissionsInterface::addItem

Same name in other branches
  1. 11.x core/lib/Drupal/Core/Session/RefinableCalculatedPermissionsInterface.php \Drupal\Core\Session\RefinableCalculatedPermissionsInterface::addItem()

Adds a calculated permission item.

Parameters

\Drupal\Core\Session\CalculatedPermissionsItemInterface $item: The calculated permission item.

bool $overwrite: (optional) Whether to overwrite an item if there already is one for the given identifier within the scope. Defaults to FALSE, meaning a merge will take place instead.

Return value

self

1 method overrides RefinableCalculatedPermissionsInterface::addItem()
RefinableCalculatedPermissions::addItem in core/lib/Drupal/Core/Session/RefinableCalculatedPermissions.php

File

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

Class

RefinableCalculatedPermissionsInterface
Defines the refinable calculated permissions interface.

Namespace

Drupal\Core\Session

Code

public function addItem(CalculatedPermissionsItemInterface $item, bool $overwrite = FALSE) : self;

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.