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

Breadcrumb

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

function Command::getSynopsis

Returns the synopsis for the command.

Parameters

bool $short Whether to show the short version of the synopsis (with options folded) or not:

2 methods override Command::getSynopsis()
LazyCommand::getSynopsis in vendor/symfony/console/Command/LazyCommand.php
Returns the synopsis for the command.
TraceableCommand::getSynopsis in vendor/symfony/console/Command/TraceableCommand.php
Returns the synopsis for the command.

File

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

Class

Command
Base class for all commands.

Namespace

Symfony\Component\Console\Command

Code

public function getSynopsis(bool $short = false) : string {
    $key = $short ? 'short' : 'long';
    if (!isset($this->synopsis[$key])) {
        $this->synopsis[$key] = trim(\sprintf('%s %s', $this->name, $this->definition
            ->getSynopsis($short)));
    }
    return $this->synopsis[$key];
}

API Navigation

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