function BlockVariantTrait::eventDispatcher
Same name in other branches
- 4.0.x src/Plugin/BlockVariantTrait.php \Drupal\ctools\Plugin\BlockVariantTrait::eventDispatcher()
Gets the event dispatcher.
Return value
\Symfony\Component\EventDispatcher\EventDispatcherInterface
File
-
src/
Plugin/ BlockVariantTrait.php, line 148
Class
- BlockVariantTrait
- Provides methods for \Drupal\ctools\Plugin\BlockVariantInterface.
Namespace
Drupal\ctools\PluginCode
protected function eventDispatcher() {
if (!$this->eventDispatcher) {
$this->eventDispatcher = \Drupal::service('event_dispatcher');
}
return $this->eventDispatcher;
}