class BlockContentGetDependencyEvent
Same name in other branches
- 9 core/modules/block_content/src/Event/BlockContentGetDependencyEvent.php \Drupal\block_content\Event\BlockContentGetDependencyEvent
- 8.9.x core/modules/block_content/src/Event/BlockContentGetDependencyEvent.php \Drupal\block_content\Event\BlockContentGetDependencyEvent
- 11.x core/modules/block_content/src/Event/BlockContentGetDependencyEvent.php \Drupal\block_content\Event\BlockContentGetDependencyEvent
Block content event to allow setting an access dependency.
@internal
Hierarchy
- class \Drupal\Component\EventDispatcher\Event extends \Symfony\Contracts\EventDispatcher\Event
- class \Drupal\block_content\Event\BlockContentGetDependencyEvent extends \Drupal\Component\EventDispatcher\Event
Expanded class hierarchy of BlockContentGetDependencyEvent
2 files declare their use of BlockContentGetDependencyEvent
- BlockContentAccessControlHandler.php in core/
modules/ block_content/ src/ BlockContentAccessControlHandler.php - SetInlineBlockDependency.php in core/
modules/ layout_builder/ src/ EventSubscriber/ SetInlineBlockDependency.php
File
-
core/
modules/ block_content/ src/ Event/ BlockContentGetDependencyEvent.php, line 14
Namespace
Drupal\block_content\EventView source
class BlockContentGetDependencyEvent extends Event {
/**
* The block content entity.
*
* @var \Drupal\block_content\BlockContentInterface
*/
protected $blockContent;
/**
* The dependency.
*
* @var \Drupal\Core\Access\AccessibleInterface
*/
protected $accessDependency;
/**
* BlockContentGetDependencyEvent constructor.
*
* @param \Drupal\block_content\BlockContentInterface $blockContent
* The block content entity.
*/
public function __construct(BlockContentInterface $blockContent) {
$this->blockContent = $blockContent;
}
/**
* Gets the block content entity.
*
* @return \Drupal\block_content\BlockContentInterface
* The block content entity.
*/
public function getBlockContentEntity() {
return $this->blockContent;
}
/**
* Gets the access dependency.
*
* @return \Drupal\Core\Access\AccessibleInterface
* The access dependency.
*/
public function getAccessDependency() {
return $this->accessDependency;
}
/**
* Sets the access dependency.
*
* @param \Drupal\Core\Access\AccessibleInterface $access_dependency
* The access dependency.
*/
public function setAccessDependency(AccessibleInterface $access_dependency) {
$this->accessDependency = $access_dependency;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
BlockContentGetDependencyEvent::$accessDependency | protected | property | The dependency. |
BlockContentGetDependencyEvent::$blockContent | protected | property | The block content entity. |
BlockContentGetDependencyEvent::getAccessDependency | public | function | Gets the access dependency. |
BlockContentGetDependencyEvent::getBlockContentEntity | public | function | Gets the block content entity. |
BlockContentGetDependencyEvent::setAccessDependency | public | function | Sets the access dependency. |
BlockContentGetDependencyEvent::__construct | public | function | BlockContentGetDependencyEvent constructor. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.