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

Breadcrumb

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

function Application::setDefaultCommand

Sets the default Command name.

Return value

$this

File

vendor/symfony/console/Application.php, line 1239

Class

Application
An Application is the container for a collection of commands.

Namespace

Symfony\Component\Console

Code

public function setDefaultCommand(string $commandName, bool $isSingleCommand = false) : static {
    $this->defaultCommand = explode('|', ltrim($commandName, '|'))[0];
    if ($isSingleCommand) {
        // Ensure the command exist
        $this->find($commandName);
        $this->singleCommand = true;
    }
    return $this;
}

API Navigation

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