class PanelsVariantEvent in Panels 8.4
Event object for events relating to Panels display variants.
Hierarchy
- class \Drupal\panels\PanelsVariantEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of PanelsVariantEvent
2 files declare their use of PanelsVariantEvent
- PanelsStorageManager.php in src/
Storage/ PanelsStorageManager.php - PanelsStorageManagerTest.php in tests/
src/ Kernel/ PanelsStorageManagerTest.php
File
- src/
PanelsVariantEvent.php, line 11
Namespace
Drupal\panelsView source
class PanelsVariantEvent extends Event {
/**
* The Panels display variant.
*
* @var \Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant
*/
protected $variant;
/**
* PanelsVariantEvent constructor.
*
* @param \Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant $variant
* The Panels display variant.
*/
public function __construct(PanelsDisplayVariant $variant) {
$this->variant = $variant;
}
/**
* Returns the Panels display variant that triggered the event.
*
* @return \Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant
* The Panels display variant.
*/
public function getVariant() {
return $this->variant;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PanelsVariantEvent:: |
protected | property | The Panels display variant. | |
PanelsVariantEvent:: |
public | function | Returns the Panels display variant that triggered the event. | |
PanelsVariantEvent:: |
public | function | PanelsVariantEvent constructor. |