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

Breadcrumb

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

function Table::fillCells

fill cells for a row that contains colspan > 1.

1 call to Table::fillCells()
Table::buildTableRows in vendor/symfony/console/Helper/Table.php

File

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

Class

Table
Provides helpers to display a table.

Namespace

Symfony\Component\Console\Helper

Code

private function fillCells(iterable $row) : iterable {
    $newRow = [];
    foreach ($row as $column => $cell) {
        $newRow[] = $cell;
        if ($cell instanceof TableCell && $cell->getColspan() > 1) {
            foreach (range($column + 1, $column + $cell->getColspan() - 1) as $position) {
                // insert empty value at column position
                $newRow[] = '';
            }
        }
    }
    return $newRow ?: $row;
}

API Navigation

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