You are here

class LightningCoreCommands in Lightning Core 8

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

Hierarchy

Expanded class hierarchy of LightningCoreCommands

1 string reference to 'LightningCoreCommands'
drush.services.yml in ./drush.services.yml
drush.services.yml
1 service uses LightningCoreCommands
lightning_core.commands in ./drush.services.yml
\Drupal\lightning_core\Commands\LightningCoreCommands

File

src/Commands/LightningCoreCommands.php, line 8

Namespace

Drupal\lightning_core\Commands
View source
class LightningCoreCommands extends DrushCommands {

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

  /**
   * LightningCoreCommands constructor.
   *
   * @param \Drupal\lightning_core\UpdateManager $update_manager
   *   The update manager service.
   */
  public function __construct(UpdateManager $update_manager) {
    $this->updateManager = $update_manager;
  }

  /**
   * Executes Lightning configuration updates from a specific version.
   *
   * @command update:lightning
   *
   * @usage update:lightning
   *   Runs all available configuration updates.
   */
  public function update() {
    $io = new DrushStyle($this
      ->input(), $this
      ->output());
    $this->updateManager
      ->executeAllInConsole($io);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
LightningCoreCommands::$updateManager protected property The update manager service.
LightningCoreCommands::update public function Executes Lightning configuration updates from a specific version.
LightningCoreCommands::__construct public function LightningCoreCommands constructor.