NodeEventVariables.php in Hook Event Dispatcher 3.x
Same filename and directory in other branches
File
modules/preprocess_event_dispatcher/src/Variables/NodeEventVariables.phpView source
<?php
namespace Drupal\preprocess_event_dispatcher\Variables;
use Drupal\Core\Entity\EntityInterface;
use Drupal\node\NodeInterface;
/**
* Class NodeEventVariables.
*/
class NodeEventVariables extends AbstractEntityEventVariables {
/**
* Get the node.
*
* @return \Drupal\node\NodeInterface
* The node.
*/
public function getNode() : NodeInterface {
return $this->variables['node'];
}
/**
* {@inheritdoc}
*/
public function getEntity() : EntityInterface {
return $this
->getNode();
}
}
Classes
Name | Description |
---|---|
NodeEventVariables | Class NodeEventVariables. |