You are here

ViewEventVariables.php in Hook Event Dispatcher 8.2

File

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

namespace Drupal\preprocess_event_dispatcher\Variables;

use Drupal\views\ViewExecutable;

/**
 * Class ViewEventVariables.
 */
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'];
  }

}

Classes

Namesort descending Description
ViewEventVariables Class ViewEventVariables.