You are here

class UpdateCommand in Lightning Core 8

Same name and namespace in other branches
  1. 8.5 src/Command/UpdateCommand.php \Drupal\lightning_core\Command\UpdateCommand
  2. 8.2 src/Command/UpdateCommand.php \Drupal\lightning_core\Command\UpdateCommand
  3. 8.3 src/Command/UpdateCommand.php \Drupal\lightning_core\Command\UpdateCommand
  4. 8.4 src/Command/UpdateCommand.php \Drupal\lightning_core\Command\UpdateCommand

Hierarchy

  • class \Drupal\lightning_core\Command\UpdateCommand extends \Drupal\Console\Core\Command\Command

Expanded class hierarchy of UpdateCommand

1 string reference to 'UpdateCommand'
lightning_core.services.yml in ./lightning_core.services.yml
lightning_core.services.yml
1 service uses UpdateCommand
lightning.command.update in ./lightning_core.services.yml
\Drupal\lightning_core\Command\UpdateCommand

File

src/Command/UpdateCommand.php, line 11

Namespace

Drupal\lightning_core\Command
View source
class UpdateCommand extends Command {

  /**
   * The update manager service.
   *
   * @var \Drupal\lightning_core\UpdateManager
   */
  protected $updateManager;

  /**
   * UpdateCommand constructor.
   *
   * @param UpdateManager $update_manager
   *   The update manager service.
   */
  public function __construct(UpdateManager $update_manager) {
    parent::__construct('update:lightning');
    $this->updateManager = $update_manager;
  }

  /**
   * {@inheritdoc}
   */
  protected function execute(InputInterface $input, OutputInterface $output) {
    $io = new DrupalStyle($input, $output);
    $this->updateManager
      ->executeAllInConsole($io);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
UpdateCommand::$updateManager protected property The update manager service.
UpdateCommand::execute protected function
UpdateCommand::__construct public function UpdateCommand constructor.