class BlockVariantEvent in Chaos Tool Suite (ctools) 8.3
Hierarchy
- class \Drupal\ctools\Event\BlockVariantEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of BlockVariantEvent
2 files declare their use of BlockVariantEvent
- BlockDisplayVariantTest.php in tests/
src/ Kernel/ BlockDisplayVariantTest.php - BlockVariantTrait.php in src/
Plugin/ BlockVariantTrait.php
File
- src/
Event/ BlockVariantEvent.php, line 9
Namespace
Drupal\ctools\EventView source
class BlockVariantEvent extends Event {
/**
* The block being acted upon.
*
* @var \Drupal\Core\Block\BlockPluginInterface
*/
protected $block;
/**
* The variant acting on the block.
*
* @var \Drupal\ctools\Plugin\BlockVariantInterface
*/
protected $variant;
/**
* BlockVariantEvent constructor.
*
* @param \Drupal\Core\Block\BlockPluginInterface $block
* The block plugin.
* @param \Drupal\ctools\Plugin\BlockVariantInterface $variant
* The variant plugin.
*/
public function __construct(BlockPluginInterface $block, BlockVariantInterface $variant) {
$this->block = $block;
$this->variant = $variant;
}
/**
* Gets the block plugin.
*
* @return \Drupal\Core\Block\BlockPluginInterface
*/
public function getBlock() {
return $this->block;
}
/**
* Gets the variant plugin.
*
* @return \Drupal\ctools\Plugin\BlockVariantInterface
*/
public function getVariant() {
return $this->variant;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BlockVariantEvent:: |
protected | property | The block being acted upon. | |
BlockVariantEvent:: |
protected | property | The variant acting on the block. | |
BlockVariantEvent:: |
public | function | Gets the block plugin. | |
BlockVariantEvent:: |
public | function | Gets the variant plugin. | |
BlockVariantEvent:: |
public | function | BlockVariantEvent constructor. |