You are here

PageTopEvent.php in Hook Event Dispatcher 3.x

Same filename and directory in other branches
  1. 8.2 modules/core_event_dispatcher/src/Event/Theme/PageTopEvent.php

File

modules/core_event_dispatcher/src/Event/Theme/PageTopEvent.php
View source
<?php

namespace Drupal\core_event_dispatcher\Event\Theme;

use Drupal\hook_event_dispatcher\Event\EventInterface;
use Drupal\hook_event_dispatcher\HookEventDispatcherInterface;
use Symfony\Component\EventDispatcher\Event;

/**
 * Class PageTopEvent.
 */
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() : array {
    return $this->build;
  }

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

}

Classes

Namesort descending Description
PageTopEvent Class PageTopEvent.