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

Breadcrumb

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

interface OutputFormatterStyleInterface

Formatter style interface for defining styles.

@author Konstantin Kudryashov <ever.zet@gmail.com>

Hierarchy

  • interface \Symfony\Component\Console\Formatter\OutputFormatterStyleInterface

Expanded class hierarchy of OutputFormatterStyleInterface

All classes that implement OutputFormatterStyleInterface

File

vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php, line 19

Namespace

Symfony\Component\Console\Formatter
View source
interface OutputFormatterStyleInterface {
    
    /**
     * Sets style foreground color.
     */
    public function setForeground(?string $color) : void;
    
    /**
     * Sets style background color.
     */
    public function setBackground(?string $color) : void;
    
    /**
     * Sets some specific style option.
     */
    public function setOption(string $option) : void;
    
    /**
     * Unsets some specific style option.
     */
    public function unsetOption(string $option) : void;
    
    /**
     * Sets multiple style options at once.
     */
    public function setOptions(array $options) : void;
    
    /**
     * Applies the style to a given text.
     */
    public function apply(string $text) : string;

}

Members

Title Sort descending Modifiers Object type Summary Overrides
OutputFormatterStyleInterface::apply public function Applies the style to a given text. 2
OutputFormatterStyleInterface::setBackground public function Sets style background color. 2
OutputFormatterStyleInterface::setForeground public function Sets style foreground color. 2
OutputFormatterStyleInterface::setOption public function Sets some specific style option. 2
OutputFormatterStyleInterface::setOptions public function Sets multiple style options at once. 2
OutputFormatterStyleInterface::unsetOption public function Unsets some specific style option. 2

API Navigation

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