EckEntityEventVariables.php in Hook Event Dispatcher 8.2
File
modules/preprocess_event_dispatcher/src/Variables/EckEntityEventVariables.php
View source
<?php
namespace Drupal\preprocess_event_dispatcher\Variables;
use Drupal\Core\Entity\EntityInterface;
use Drupal\eck\EckEntityInterface;
class EckEntityEventVariables extends AbstractEntityEventVariables {
public function getEckEntity() : EckEntityInterface {
return $this->variables['eck_entity'];
}
public function getEntity() : EntityInterface {
return $this
->getEckEntity();
}
public function getEntityBundle() : string {
return $this->variables['bundle'];
}
public function getViewMode() : string {
return $this->variables['elements']['#view_mode'];
}
}