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

Breadcrumb

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

function Command::getProcessedHelp

Returns the processed help for the command replacing the %command.name% and %command.full_name% patterns with the real values dynamically.

2 methods override Command::getProcessedHelp()
LazyCommand::getProcessedHelp in vendor/symfony/console/Command/LazyCommand.php
Returns the processed help for the command replacing the %command.name% and %command.full_name% patterns with the real values dynamically.
TraceableCommand::getProcessedHelp in vendor/symfony/console/Command/TraceableCommand.php
Returns the processed help for the command replacing the %command.name% and %command.full_name% patterns with the real values dynamically.

File

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

Class

Command
Base class for all commands.

Namespace

Symfony\Component\Console\Command

Code

public function getProcessedHelp() : string {
    $name = $this->name;
    $isSingleCommand = $this->application?->isSingleCommand();
    $placeholders = [
        '%command.name%',
        '%command.full_name%',
    ];
    $replacements = [
        $name,
        $isSingleCommand ? $_SERVER['PHP_SELF'] : $_SERVER['PHP_SELF'] . ' ' . $name,
    ];
    return str_replace($placeholders, $replacements, $this->getHelp() ?: $this->getDescription());
}

API Navigation

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