You are here

private function Table::getRowColumns in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Helper/Table.php \Symfony\Component\Console\Helper\Table::getRowColumns()

Gets list of columns for the given row.

Parameters

array $row:

Return value

array()

1 call to Table::getRowColumns()
Table::renderRow in vendor/symfony/console/Helper/Table.php
Renders table row.

File

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

Class

Table
Provides helpers to display a table.

Namespace

Symfony\Component\Console\Helper

Code

private function getRowColumns($row) {
  $columns = range(0, $this->numberOfColumns - 1);
  foreach ($row as $cellKey => $cell) {
    if ($cell instanceof TableCell && $cell
      ->getColspan() > 1) {

      // exclude grouped columns.
      $columns = array_diff($columns, range($cellKey + 1, $cellKey + $cell
        ->getColspan() - 1));
    }
  }
  return $columns;
}