You are here

class ViewFieldEventVariables in Hook Event Dispatcher 8

Class ViewFieldEventVariables.

Hierarchy

Expanded class hierarchy of ViewFieldEventVariables

2 files declare their use of ViewFieldEventVariables
OtherEventVariablesTest.php in tests/src/Unit/Preprocess/OtherEventVariablesTest.php
ViewFieldPreprocessEventFactory.php in src/Event/Preprocess/Factory/ViewFieldPreprocessEventFactory.php

File

src/Event/Preprocess/Variables/ViewFieldEventVariables.php, line 8

Namespace

Drupal\hook_event_dispatcher\Event\Preprocess\Variables
View source
class ViewFieldEventVariables extends AbstractEventVariables {

  /**
   * Get the field.
   *
   * @return \Drupal\views\Plugin\views\field\EntityField
   *   Field.
   */
  public function getField() {
    return $this->variables['field'];
  }

  /**
   * Get the output.
   *
   * @return \Drupal\views\Plugin\views\field\Markup
   *   Output.
   */
  public function getOutput() {
    return $this->variables['output'];
  }

  /**
   * Get the row.
   *
   * @return \Drupal\views\ResultRow
   *   Row.
   */
  public function getRow() {
    return $this->variables['row'];
  }

  /**
   * Get the view.
   *
   * @return \Drupal\views\ViewExecutable
   *   View.
   */
  public function getView() {
    return $this->variables['view'];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AbstractEventVariables::$variables protected property Variables.
AbstractEventVariables::get public function Get a variable with a given name, return default if it does not exist. 1
AbstractEventVariables::getByReference public function Get a variable with a given name by reference. 1
AbstractEventVariables::remove public function Remove a given variable. 1
AbstractEventVariables::set public function Set a variable to a given value. 1
AbstractEventVariables::__construct public function Event Variables constructor.
ViewFieldEventVariables::getField public function Get the field.
ViewFieldEventVariables::getOutput public function Get the output.
ViewFieldEventVariables::getRow public function Get the row.
ViewFieldEventVariables::getView public function Get the view.