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

Breadcrumb

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

function Table::initStyles

Return value

array<string, TableStyle>

3 calls to Table::initStyles()
Table::getStyleDefinition in vendor/symfony/console/Helper/Table.php
Gets a style definition by name.
Table::setStyleDefinition in vendor/symfony/console/Helper/Table.php
Sets a style definition.
Table::__construct in vendor/symfony/console/Helper/Table.php

File

vendor/symfony/console/Helper/Table.php, line 869

Class

Table
Provides helpers to display a table.

Namespace

Symfony\Component\Console\Helper

Code

private static function initStyles() : array {
    $borderless = new TableStyle();
    $borderless->setHorizontalBorderChars('=')
        ->setVerticalBorderChars(' ')
        ->setDefaultCrossingChar(' ');
    $compact = new TableStyle();
    $compact->setHorizontalBorderChars('')
        ->setVerticalBorderChars('')
        ->setDefaultCrossingChar('')
        ->setCellRowContentFormat('%s ');
    $styleGuide = new TableStyle();
    $styleGuide->setHorizontalBorderChars('-')
        ->setVerticalBorderChars(' ')
        ->setDefaultCrossingChar(' ')
        ->setCellHeaderFormat('%s');
    $box = (new TableStyle())->setHorizontalBorderChars('─')
        ->setVerticalBorderChars('│')
        ->setCrossingChars('┼', '┌', '┬', '┐', '┤', '┘', '┴', '└', '├');
    $boxDouble = (new TableStyle())->setHorizontalBorderChars('═', '─')
        ->setVerticalBorderChars('║', '│')
        ->setCrossingChars('┼', '╔', '╤', '╗', '╢', '╝', '╧', '╚', '╟', '╠', '╪', '╣');
    return [
        'default' => new TableStyle(),
        'borderless' => $borderless,
        'compact' => $compact,
        'symfony-style-guide' => $styleGuide,
        'box' => $box,
        'box-double' => $boxDouble,
    ];
}

API Navigation

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