UpdateCommand.php in Lightning Core 8
File
src/Command/UpdateCommand.php
View source
<?php
namespace Drupal\lightning_core\Command;
use Drupal\Console\Core\Command\Command;
use Drupal\Console\Core\Style\DrupalStyle;
use Drupal\lightning_core\UpdateManager;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class UpdateCommand extends Command {
protected $updateManager;
public function __construct(UpdateManager $update_manager) {
parent::__construct('update:lightning');
$this->updateManager = $update_manager;
}
protected function execute(InputInterface $input, OutputInterface $output) {
$io = new DrupalStyle($input, $output);
$this->updateManager
->executeAllInConsole($io);
}
}