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

Breadcrumb

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

function Table::getNumberOfColumns

Gets number of columns by row.

2 calls to Table::getNumberOfColumns()
Table::calculateNumberOfColumns in vendor/symfony/console/Helper/Table.php
Calculate number of columns for this table.
Table::fillNextRows in vendor/symfony/console/Helper/Table.php
fill rows that contains rowspan > 1.

File

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

Class

Table
Provides helpers to display a table.

Namespace

Symfony\Component\Console\Helper

Code

private function getNumberOfColumns(array $row) : int {
    $columns = \count($row);
    foreach ($row as $column) {
        $columns += $column instanceof TableCell ? $column->getColspan() - 1 : 0;
    }
    return $columns;
}

API Navigation

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