class ViewEventVariables in Hook Event Dispatcher 3.x
Same name and namespace in other branches
- 8.2 modules/preprocess_event_dispatcher/src/Variables/ViewEventVariables.php \Drupal\preprocess_event_dispatcher\Variables\ViewEventVariables
Class ViewEventVariables.
Hierarchy
- class \Drupal\preprocess_event_dispatcher\Variables\AbstractEventVariables
- class \Drupal\preprocess_event_dispatcher\Variables\ViewEventVariables
Expanded class hierarchy of ViewEventVariables
2 files declare their use of ViewEventVariables
- OtherEventVariablesTest.php in modules/
preprocess_event_dispatcher/ tests/ src/ Unit/ OtherEventVariablesTest.php - ViewPreprocessEventFactory.php in modules/
preprocess_event_dispatcher/ src/ Factory/ ViewPreprocessEventFactory.php
File
- modules/
preprocess_event_dispatcher/ src/ Variables/ ViewEventVariables.php, line 10
Namespace
Drupal\preprocess_event_dispatcher\VariablesView source
class ViewEventVariables extends AbstractEventVariables {
/**
* Get the rows.
*
* @return array
* Rows.
*/
public function &getRows() : array {
return $this->variables['rows'][0]['#rows'];
}
/**
* Get the view.
*
* @return \Drupal\views\ViewExecutable
* View.
*/
public function getView() : ViewExecutable {
return $this->variables['view'];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AbstractEventVariables:: |
protected | property | Variables. | |
AbstractEventVariables:: |
public | function | Get a variable with a given name, return default if it does not exist. | 1 |
AbstractEventVariables:: |
public | function | Get a variable with a given name by reference. | 1 |
AbstractEventVariables:: |
public | function | Remove a given variable. | 1 |
AbstractEventVariables:: |
public | function | Set a variable to a given value. | 1 |
AbstractEventVariables:: |
public | function | Event Variables constructor. | |
ViewEventVariables:: |
public | function | Get the rows. | |
ViewEventVariables:: |
public | function | Get the view. |