You are here

class FieldEventVariables in Hook Event Dispatcher 8.2

Same name and namespace in other branches
  1. 3.x modules/preprocess_event_dispatcher/src/Variables/FieldEventVariables.php \Drupal\preprocess_event_dispatcher\Variables\FieldEventVariables

Class FieldEventVariables.

Hierarchy

Expanded class hierarchy of FieldEventVariables

2 files declare their use of FieldEventVariables
FieldPreprocessEventFactory.php in modules/preprocess_event_dispatcher/src/Factory/FieldPreprocessEventFactory.php
OtherEventVariablesTest.php in modules/preprocess_event_dispatcher/tests/src/Unit/OtherEventVariablesTest.php

File

modules/preprocess_event_dispatcher/src/Variables/FieldEventVariables.php, line 8

Namespace

Drupal\preprocess_event_dispatcher\Variables
View source
class FieldEventVariables extends AbstractEventVariables {

  /**
   * Get the element array by reference.
   *
   * @return array
   *   Element array reference.
   */
  public function &getElement() : array {
    return $this->variables['element'];
  }

  /**
   * Get the items array by reference.
   *
   * @return array
   *   Items array reference.
   */
  public function &getItems() : array {
    return $this->variables['items'];
  }

}

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.
FieldEventVariables::getElement public function Get the element array by reference.
FieldEventVariables::getItems public function Get the items array by reference.