You are here

NodeEventVariables.php in Hook Event Dispatcher 3.x

File

modules/preprocess_event_dispatcher/src/Variables/NodeEventVariables.php
View 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

Namesort descending Description
NodeEventVariables Class NodeEventVariables.