You are here

TaxonomyTermEventVariables.php in Hook Event Dispatcher 3.x

File

modules/preprocess_event_dispatcher/src/Variables/TaxonomyTermEventVariables.php
View source
<?php

namespace Drupal\preprocess_event_dispatcher\Variables;

use Drupal\Core\Entity\EntityInterface;
use Drupal\taxonomy\TermInterface;

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

  /**
   * Get the TaxonomyTermEntity.
   *
   * @return \Drupal\taxonomy\TermInterface
   *   TaxonomyTermEntity.
   */
  public function getTerm() : TermInterface {
    return $this->variables['term'];
  }

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

}

Classes

Namesort descending Description
TaxonomyTermEventVariables Class TaxonomyTermEventVariables.