Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Command.php

function Command::initialize

Initializes the command after the input has been bound and before the input is validated.

This is mainly useful when a lot of commands extends one main command where some things need to be initialized based on the input arguments and options.

Return value

void

See also

InputInterface::bind()

InputInterface::validate()

3 calls to Command::initialize()
BaseCommand::initialize in vendor/composer/composer/src/Composer/Command/BaseCommand.php
@inheritDoc
BaseCommand::initialize in vendor/composer/composer/src/Composer/Command/BaseCommand.php
@inheritDoc
Command::run in vendor/symfony/console/Command/Command.php
Runs the command.
4 methods override Command::initialize()
BaseCommand::initialize in vendor/composer/composer/src/Composer/Command/BaseCommand.php
@inheritDoc
CompleteCommand::initialize in vendor/symfony/console/Command/CompleteCommand.php
Initializes the command after the input has been bound and before the input is validated.
GenerateTheme::initialize in core/lib/Drupal/Core/Command/GenerateTheme.php
Initializes the command after the input has been bound and before the input is validated.
TraceableCommand::initialize in vendor/symfony/console/Command/TraceableCommand.php
Initializes the command after the input has been bound and before the input is validated.

File

vendor/symfony/console/Command/Command.php, line 213

Class

Command
Base class for all commands.

Namespace

Symfony\Component\Console\Command

Code

protected function initialize(InputInterface $input, OutputInterface $output) {
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal