public function Page::addAccessCondition in Page Manager 8
Same name and namespace in other branches
- 8.4 src/Entity/Page.php \Drupal\page_manager\Entity\Page::addAccessCondition()
Adds a new access condition to the page entity.
Parameters
array $configuration: An array of configuration for the new access condition.
Return value
string The access condition ID.
Overrides PageInterface::addAccessCondition
File
- src/
Entity/ Page.php, line 212 - Contains \Drupal\page_manager\Entity\Page.
Class
- Page
- Defines a Page entity class.
Namespace
Drupal\page_manager\EntityCode
public function addAccessCondition(array $configuration) {
$configuration['uuid'] = $this
->uuidGenerator()
->generate();
$this
->getAccessConditions()
->addInstanceId($configuration['uuid'], $configuration);
return $configuration['uuid'];
}