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

Breadcrumb

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

function SymfonyStyle::block

Formats a message as a block of text.

7 calls to SymfonyStyle::block()
SymfonyStyle::caution in vendor/symfony/console/Style/SymfonyStyle.php
Formats a caution admonition.
SymfonyStyle::comment in vendor/symfony/console/Style/SymfonyStyle.php
Formats a command comment.
SymfonyStyle::error in vendor/symfony/console/Style/SymfonyStyle.php
Formats an error result bar.
SymfonyStyle::info in vendor/symfony/console/Style/SymfonyStyle.php
Formats an info message.
SymfonyStyle::note in vendor/symfony/console/Style/SymfonyStyle.php
Formats a note admonition.

... See full list

File

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

Class

SymfonyStyle
Output decorator helpers for the Symfony Style Guide.

Namespace

Symfony\Component\Console\Style

Code

public function block(string|array $messages, ?string $type = null, ?string $style = null, string $prefix = ' ', bool $padding = false, bool $escape = true) : void {
    $messages = \is_array($messages) ? array_values($messages) : [
        $messages,
    ];
    $this->autoPrependBlock();
    $this->writeln($this->createBlock($messages, $type, $style, $prefix, $padding, $escape));
    $this->newLine();
}

API Navigation

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