ParagraphEventVariables.php in Hook Event Dispatcher 3.x
File
modules/preprocess_event_dispatcher/src/Variables/ParagraphEventVariables.php
View source
<?php
namespace Drupal\preprocess_event_dispatcher\Variables;
use Drupal\Core\Entity\EntityInterface;
use Drupal\paragraphs\ParagraphInterface;
class ParagraphEventVariables extends AbstractEntityEventVariables {
public function getParagraph() : ParagraphInterface {
return $this->variables['paragraph'];
}
public function getEntity() : EntityInterface {
return $this
->getParagraph();
}
}