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

Breadcrumb

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

function SymfonyStyle::autoPrependBlock

4 calls to SymfonyStyle::autoPrependBlock()
SymfonyStyle::askQuestion in vendor/symfony/console/Style/SymfonyStyle.php
SymfonyStyle::block in vendor/symfony/console/Style/SymfonyStyle.php
Formats a message as a block of text.
SymfonyStyle::section in vendor/symfony/console/Style/SymfonyStyle.php
Formats a section title.
SymfonyStyle::title in vendor/symfony/console/Style/SymfonyStyle.php
Formats a command title.

File

vendor/symfony/console/Style/SymfonyStyle.php, line 372

Class

SymfonyStyle
Output decorator helpers for the Symfony Style Guide.

Namespace

Symfony\Component\Console\Style

Code

private function autoPrependBlock() : void {
    $chars = substr(str_replace(\PHP_EOL, "\n", $this->bufferedOutput
        ->fetch()), -2);
    if (!isset($chars[0])) {
        $this->newLine();
        // empty history, so we should start with a new line.
        return;
    }
    // Prepend new line for each non LF chars (This means no blank line was output before)
    $this->newLine(2 - substr_count($chars, "\n"));
}

API Navigation

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