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

Breadcrumb

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

interface StyleInterface

Output style helpers.

@author Kevin Bond <kevinbond@gmail.com>

Hierarchy

  • interface \Symfony\Component\Console\Style\StyleInterface

Expanded class hierarchy of StyleInterface

All classes that implement StyleInterface

1 file declares its use of StyleInterface
ConsoleInputCollector.php in core/lib/Drupal/Core/Recipe/ConsoleInputCollector.php

File

vendor/symfony/console/Style/StyleInterface.php, line 19

Namespace

Symfony\Component\Console\Style
View source
interface StyleInterface {
    
    /**
     * Formats a command title.
     */
    public function title(string $message) : void;
    
    /**
     * Formats a section title.
     */
    public function section(string $message) : void;
    
    /**
     * Formats a list.
     */
    public function listing(array $elements) : void;
    
    /**
     * Formats informational text.
     */
    public function text(string|array $message) : void;
    
    /**
     * Formats a success result bar.
     */
    public function success(string|array $message) : void;
    
    /**
     * Formats an error result bar.
     */
    public function error(string|array $message) : void;
    
    /**
     * Formats an warning result bar.
     */
    public function warning(string|array $message) : void;
    
    /**
     * Formats a note admonition.
     */
    public function note(string|array $message) : void;
    
    /**
     * Formats a caution admonition.
     */
    public function caution(string|array $message) : void;
    
    /**
     * Formats a table.
     */
    public function table(array $headers, array $rows) : void;
    
    /**
     * Asks a question.
     */
    public function ask(string $question, ?string $default = null, ?callable $validator = null) : mixed;
    
    /**
     * Asks a question with the user input hidden.
     */
    public function askHidden(string $question, ?callable $validator = null) : mixed;
    
    /**
     * Asks for confirmation.
     */
    public function confirm(string $question, bool $default = true) : bool;
    
    /**
     * Asks a choice question.
     */
    public function choice(string $question, array $choices, mixed $default = null) : mixed;
    
    /**
     * Add newline(s).
     */
    public function newLine(int $count = 1) : void;
    
    /**
     * Starts the progress output.
     */
    public function progressStart(int $max = 0) : void;
    
    /**
     * Advances the progress output X steps.
     */
    public function progressAdvance(int $step = 1) : void;
    
    /**
     * Finishes the progress output.
     */
    public function progressFinish() : void;

}

Members

Title Sort descending Modifiers Object type Summary Overrides
StyleInterface::ask public function Asks a question. 1
StyleInterface::askHidden public function Asks a question with the user input hidden. 1
StyleInterface::caution public function Formats a caution admonition. 1
StyleInterface::choice public function Asks a choice question. 1
StyleInterface::confirm public function Asks for confirmation. 1
StyleInterface::error public function Formats an error result bar. 1
StyleInterface::listing public function Formats a list. 1
StyleInterface::newLine public function Add newline(s). 1
StyleInterface::note public function Formats a note admonition. 1
StyleInterface::progressAdvance public function Advances the progress output X steps. 1
StyleInterface::progressFinish public function Finishes the progress output. 1
StyleInterface::progressStart public function Starts the progress output. 1
StyleInterface::section public function Formats a section title. 1
StyleInterface::success public function Formats a success result bar. 1
StyleInterface::table public function Formats a table. 1
StyleInterface::text public function Formats informational text. 1
StyleInterface::title public function Formats a command title. 1
StyleInterface::warning public function Formats an warning result bar. 1
RSS feed
Powered by Drupal