You are here

class CommandInteractEvent in Update helper 2.x

Same name and namespace in other branches
  1. 8 src/Events/CommandInteractEvent.php \Drupal\update_helper\Events\CommandInteractEvent

Event for command interactive.

@package Drupal\update_helper\Events

Hierarchy

  • class \Drupal\update_helper\Events\CommandInteractEvent extends \Symfony\Component\EventDispatcher\Event

Expanded class hierarchy of CommandInteractEvent

2 files declare their use of CommandInteractEvent
CommandGcuSubscriber.php in modules/update_helper_checklist/src/Events/CommandGcuSubscriber.php
ConfigurationUpdate.php in src/Generators/ConfigurationUpdate.php

File

src/Events/CommandInteractEvent.php, line 12

Namespace

Drupal\update_helper\Events
View source
class CommandInteractEvent extends Event {

  /**
   * The command questions.
   *
   * @var array
   */
  protected $questions = [];

  /**
   * The collected variables.
   *
   * @var array
   */
  protected $vars;

  /**
   * Command interact event constructor.
   *
   * @param array $vars
   *   The collected vars.
   */
  public function __construct(array $vars) {
    $this->vars = $vars;
  }

  /**
   * The command questions.
   *
   * @return array
   *   All the questions.
   */
  public function getQuestions() {
    return $this->questions;
  }

  /**
   * Set the questions to ask.
   *
   * @param array $questions
   *   The array of questions.
   *
   * @return $this
   */
  public function setQuestions(array $questions) {
    $this->questions = $questions;
    return $this;
  }

  /**
   * Get the collected vars.
   *
   * @return array
   *   All the collected vars.
   */
  public function getVars() {
    return $this->vars;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
CommandInteractEvent::$questions protected property The command questions.
CommandInteractEvent::$vars protected property The collected variables.
CommandInteractEvent::getQuestions public function The command questions.
CommandInteractEvent::getVars public function Get the collected vars.
CommandInteractEvent::setQuestions public function Set the questions to ask.
CommandInteractEvent::__construct public function Command interact event constructor.