You are here

public function BlockContentGetDependencyEvent::setAccessDependency in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/block_content/src/Event/BlockContentGetDependencyEvent.php \Drupal\block_content\Event\BlockContentGetDependencyEvent::setAccessDependency()
  2. 9 core/modules/block_content/src/Event/BlockContentGetDependencyEvent.php \Drupal\block_content\Event\BlockContentGetDependencyEvent::setAccessDependency()

Sets the access dependency.

Parameters

\Drupal\Core\Access\AccessibleInterface $access_dependency: The access dependency.

File

core/modules/block_content/src/Event/BlockContentGetDependencyEvent.php, line 66

Class

BlockContentGetDependencyEvent
Block content event to allow setting an access dependency.

Namespace

Drupal\block_content\Event

Code

public function setAccessDependency(AccessibleInterface $access_dependency) {
  $this->accessDependency = $access_dependency;
}