You are here

NodeEventVariables.php in Hook Event Dispatcher 8

File

src/Event/Preprocess/Variables/NodeEventVariables.php
View source
<?php

namespace Drupal\hook_event_dispatcher\Event\Preprocess\Variables;


/**
 * Class NodeEventVariables.
 */
class NodeEventVariables extends AbstractEntityEventVariables {

  /**
   * Get the node.
   *
   * @return \Drupal\node\Entity\Node
   *   The node.
   */
  public function getNode() {
    return $this->variables['node'];
  }

  /**
   * {@inheritdoc}
   */
  public function getEntity() {
    return $this
      ->getNode();
  }

}

Classes

Namesort descending Description
NodeEventVariables Class NodeEventVariables.