You are here

class DatabaseUpdateStatus in Automatic Updates 8

Database update status command.

Hierarchy

  • class \Drupal\automatic_updates\Command\BaseCommand extends \Symfony\Component\Console\Command\Command

Expanded class hierarchy of DatabaseUpdateStatus

File

src/Command/DatabaseUpdateStatus.php, line 11

Namespace

Drupal\automatic_updates\Command
View source
class DatabaseUpdateStatus extends BaseCommand {

  /**
   * {@inheritdoc}
   */
  protected function configure() {
    parent::configure();
    $this
      ->setName('updatedb-status')
      ->setDescription('List any pending database updates.')
      ->setAliases([
      'updbst',
      'updatedb:status',
    ]);
  }

  /**
   * {@inheritdoc}
   */
  protected function execute(InputInterface $input, OutputInterface $output) {
    parent::execute($input, $output);
    $pending_updates = \Drupal::service('automatic_updates.pending_db_updates')
      ->run();
    $output
      ->writeln($pending_updates);
    return 0;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
BaseCommand::$classLoader protected property The class loader.
BaseCommand::bootstrapDrupal protected function Bootstrap Drupal.
BaseCommand::__construct public function Constructs a new InstallCommand command.
DatabaseUpdateStatus::configure protected function Configures the current command. Overrides BaseCommand::configure
DatabaseUpdateStatus::execute protected function Executes the current command. Overrides BaseCommand::execute