abstract class BaseBlockEvent in Hook Event Dispatcher 8
Class BaseBlockEvent.
Hierarchy
- class \Drupal\hook_event_dispatcher\Event\Block\BaseBlockEvent extends \Symfony\Component\EventDispatcher\Event implements EventInterface
Expanded class hierarchy of BaseBlockEvent
File
- src/
Event/ Block/ BaseBlockEvent.php, line 12
Namespace
Drupal\hook_event_dispatcher\Event\BlockView source
abstract class BaseBlockEvent extends Event implements EventInterface {
/**
* The build array.
*
* @var array
*/
protected $build;
/**
* The block.
*
* @var \Drupal\Core\Block\BlockPluginInterface
*/
protected $block;
/**
* BaseBlockEvent 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() {
return $this->build;
}
/**
* Set the block.
*
* @param array $build
* The build array.
*
* @deprecated This is not needed, the form is passed by reference.
*/
public function setBuild(array $build) {
$this->build = $build;
}
/**
* Get the block.
*
* @return \Drupal\Core\Block\BlockPluginInterface
* The block object.
*/
public function getBlock() {
return $this->block;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BaseBlockEvent:: |
protected | property | The block. | |
BaseBlockEvent:: |
protected | property | The build array. | |
BaseBlockEvent:: |
public | function | Get the block. | |
BaseBlockEvent:: |
public | function | Get the build array. | |
BaseBlockEvent:: |
public | function | Set the block. | |
BaseBlockEvent:: |
public | function | BaseBlockEvent constructor. | |
EventInterface:: |
public | function | Get the dispatcher type. | 66 |