protected function LayoutParagraphsLayoutRefreshTrait::eventDispatcher in Layout Paragraphs 2.0.x
Returns the event dispatcher service.
Return value
\Symfony\Component\EventDispatcher\EventDispatcherInterface The event dispatcher service.
File
- src/
LayoutParagraphsLayoutRefreshTrait.php, line 110
Class
- LayoutParagraphsLayoutRefreshTrait
- Trait for managing refresh state for layouts.
Namespace
Drupal\layout_paragraphsCode
protected function eventDispatcher() {
if (!($this->eventDispatcher && $this->eventDispatcher instanceof EventDispatcherInterface)) {
$this->eventDispatcher = \Drupal::service('event_dispatcher');
}
return $this->eventDispatcher;
}