You are here

abstract class BaseThemeSuggestionsEvent in Hook Event Dispatcher 8

Class BaseThemeSuggestionsEvent.

Hierarchy

Expanded class hierarchy of BaseThemeSuggestionsEvent

File

src/Event/Theme/BaseThemeSuggestionsEvent.php, line 11

Namespace

Drupal\hook_event_dispatcher\Event\Theme
View source
abstract class BaseThemeSuggestionsEvent extends Event implements EventInterface {

  /**
   * Array of suggestions.
   *
   * @var array
   */
  protected $suggestions;

  /**
   * Variables.
   *
   * @var array
   */
  protected $variables;

  /**
   * Hook name.
   *
   * @var string
   */
  protected $hook;

  /**
   * BaseThemeSuggestionsEvent constructor.
   *
   * @param array $suggestions
   *   Suggestions.
   * @param array $variables
   *   Variables.
   * @param string $hook
   *   Hook name.
   */
  public function __construct(array &$suggestions, array $variables, $hook) {
    $this->suggestions =& $suggestions;
    $this->variables = $variables;
    $this->hook = $hook;
  }

  /**
   * Get suggestions.
   *
   * @return array
   *   Array of suggestions.
   */
  public function &getSuggestions() {
    return $this->suggestions;
  }

  /**
   * Set suggestions.
   *
   * @param array $suggestions
   *   Array of suggestions.
   */
  public function setSuggestions(array $suggestions) {
    $this->suggestions = $suggestions;
  }

  /**
   * Get variables.
   *
   * @return array
   *   Array of variables.
   */
  public function getVariables() {
    return $this->variables;
  }

  /**
   * Get hook.
   *
   * @return string
   *   Name of the hook.
   */
  public function getHook() {
    return $this->hook;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
BaseThemeSuggestionsEvent::$hook protected property Hook name.
BaseThemeSuggestionsEvent::$suggestions protected property Array of suggestions.
BaseThemeSuggestionsEvent::$variables protected property Variables.
BaseThemeSuggestionsEvent::getHook public function Get hook.
BaseThemeSuggestionsEvent::getSuggestions public function Get suggestions.
BaseThemeSuggestionsEvent::getVariables public function Get variables.
BaseThemeSuggestionsEvent::setSuggestions public function Set suggestions.
BaseThemeSuggestionsEvent::__construct public function BaseThemeSuggestionsEvent constructor.
EventInterface::getDispatcherType public function Get the dispatcher type. 66