You are here

class PageTopEvent in Hook Event Dispatcher 8

Class PageTopEvent.

Hierarchy

  • class \Drupal\hook_event_dispatcher\Event\Page\PageTopEvent extends \Symfony\Component\EventDispatcher\Event implements EventInterface

Expanded class hierarchy of PageTopEvent

2 files declare their use of PageTopEvent
hook_event_dispatcher.module in ./hook_event_dispatcher.module
Hook event dispatcher module.
PageTopEventTest.php in tests/src/Unit/Page/PageTopEventTest.php

File

src/Event/Page/PageTopEvent.php, line 12

Namespace

Drupal\hook_event_dispatcher\Event\Page
View source
class PageTopEvent extends Event implements EventInterface {

  /**
   * The build array.
   *
   * @var array
   */
  private $build;

  /**
   * PageTopEvent constructor.
   *
   * @param array $build
   *   The build array.
   */
  public function __construct(array &$build) {
    $this->build =& $build;
  }

  /**
   * Get the build array.
   *
   * @return array
   *   The build array.
   */
  public function &getBuild() {
    return $this->build;
  }

  /**
   * Set the build.
   *
   * @param array $build
   *   The build array.
   */
  public function setBuild(array $build) {
    $this->build = $build;
  }

  /**
   * {@inheritdoc}
   */
  public function getDispatcherType() {
    return HookEventDispatcherInterface::PAGE_TOP;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PageTopEvent::$build private property The build array.
PageTopEvent::getBuild public function Get the build array.
PageTopEvent::getDispatcherType public function Get the dispatcher type. Overrides EventInterface::getDispatcherType
PageTopEvent::setBuild public function Set the build.
PageTopEvent::__construct public function PageTopEvent constructor.