You are here

public function CommandGcuSubscriber::onExecute in Update helper 8

Same name and namespace in other branches
  1. 2.x modules/update_helper_checklist/src/Events/CommandGcuSubscriber.php \Drupal\update_helper_checklist\Events\CommandGcuSubscriber::onExecute()

Handles configuration update generation.

Parameters

\Drupal\update_helper\Events\CommandExecuteEvent $execute_event: Event.

File

modules/update_helper_checklist/src/Events/CommandGcuSubscriber.php, line 212

Class

CommandGcuSubscriber
Subscriber for "generate:configuration:update" command.

Namespace

Drupal\update_helper_checklist\Events

Code

public function onExecute(CommandExecuteEvent $execute_event) {

  // If command that triggered this event wasn't successful, then nothing
  // should be created.
  if (!$execute_event
    ->getSuccessful()) {
    return;
  }

  // Get options provided by command as options or in interactive mode.
  $options = $execute_event
    ->getOptions();
  $this->generator
    ->generate($execute_event
    ->getModule(), $execute_event
    ->getUpdateNumber(), $options[static::$updateVersionName], $options['description'], $options[static::$updateDescription], $options[static::$successMessageName], $options[static::$failureMessageName]);
}