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

Breadcrumb

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

function DebugFormatterHelper::stop

Stops a formatting session.

File

vendor/symfony/console/Helper/DebugFormatterHelper.php, line 74

Class

DebugFormatterHelper
Helps outputting debug information when running an external program from a command.

Namespace

Symfony\Component\Console\Helper

Code

public function stop(string $id, string $message, bool $successful, string $prefix = 'RES') : string {
    $trailingEOL = isset($this->started[$id]['out']) || isset($this->started[$id]['err']) ? "\n" : '';
    if ($successful) {
        return \sprintf("%s%s<bg=green;fg=white> %s </> <fg=green>%s</>\n", $trailingEOL, $this->getBorder($id), $prefix, $message);
    }
    $message = \sprintf("%s%s<bg=red;fg=white> %s </> <fg=red>%s</>\n", $trailingEOL, $this->getBorder($id), $prefix, $message);
    unset($this->started[$id]['out'], $this->started[$id]['err']);
    return $message;
}

API Navigation

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