class BlockBuildAlterEvent in Hook Event Dispatcher 8.2
Same name and namespace in other branches
- 3.x modules/core_event_dispatcher/src/Event/Block/BlockBuildAlterEvent.php \Drupal\core_event_dispatcher\Event\Block\BlockBuildAlterEvent
Class BlockBuildAlterEvent.
Hierarchy
- class \Drupal\core_event_dispatcher\Event\Block\BlockBuildAlterEvent extends \Symfony\Component\EventDispatcher\Event implements EventInterface
Expanded class hierarchy of BlockBuildAlterEvent
2 files declare their use of BlockBuildAlterEvent
- BlockEventTest.php in modules/
core_event_dispatcher/ tests/ src/ Unit/ Block/ BlockEventTest.php - core_event_dispatcher.module in modules/
core_event_dispatcher/ core_event_dispatcher.module - Core event dispatcher submodule.
File
- modules/
core_event_dispatcher/ src/ Event/ Block/ BlockBuildAlterEvent.php, line 13
Namespace
Drupal\core_event_dispatcher\Event\BlockView source
class BlockBuildAlterEvent extends Event implements EventInterface {
/**
* The build array.
*
* @var array
*/
private $build;
/**
* The block.
*
* @var \Drupal\Core\Block\BlockPluginInterface
*/
private $block;
/**
* BlockBuildAlterEvent constructor.
*
* @param array $build
* The build array.
* @param \Drupal\Core\Block\BlockPluginInterface $block
* The block object.
*/
public function __construct(array &$build, BlockPluginInterface $block) {
$this->build =& $build;
$this->block = $block;
}
/**
* Get the build array.
*
* @return array
* The build array.
*/
public function &getBuild() : array {
return $this->build;
}
/**
* Get the block.
*
* @return \Drupal\Core\Block\BlockPluginInterface
* The block object.
*/
public function getBlock() : BlockPluginInterface {
return $this->block;
}
/**
* {@inheritdoc}
*/
public function getDispatcherType() : string {
return HookEventDispatcherInterface::BLOCK_BUILD_ALTER;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BlockBuildAlterEvent:: |
private | property | The block. | |
BlockBuildAlterEvent:: |
private | property | The build array. | |
BlockBuildAlterEvent:: |
public | function | Get the block. | |
BlockBuildAlterEvent:: |
public | function | Get the build array. | |
BlockBuildAlterEvent:: |
public | function |
Get the dispatcher type. Overrides EventInterface:: |
|
BlockBuildAlterEvent:: |
public | function | BlockBuildAlterEvent constructor. |