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

Breadcrumb

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

function Table::calculateRowCount

1 call to Table::calculateRowCount()
Table::appendRow in vendor/symfony/console/Helper/Table.php
Adds a row to the table, and re-renders the table.

File

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

Class

Table
Provides helpers to display a table.

Namespace

Symfony\Component\Console\Helper

Code

private function calculateRowCount() : int {
    $numberOfRows = \count(iterator_to_array($this->buildTableRows(array_merge($this->headers, [
        new TableSeparator(),
    ], $this->rows))));
    if ($this->headers) {
        ++$numberOfRows;
        // Add row for header separator
    }
    if ($this->rows) {
        ++$numberOfRows;
        // Add row for footer separator
    }
    return $numberOfRows;
}

API Navigation

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