You are here

function _taxonomy_list_pad_row in Taxonomy List 6

Same name and namespace in other branches
  1. 5 taxonomy_list.module \_taxonomy_list_pad_row()

Pad the remaining cells in the table

1 call to _taxonomy_list_pad_row()
theme_taxonomy_list_get_table in ./taxonomy_list.module
Generate cascaded tables with terms and sub terms inside

File

./taxonomy_list.module, line 190
List all terms in a vocabulary.

Code

function _taxonomy_list_pad_row(&$cells, &$rows, $cells_per_row) {
  $cellscount = count($cells);
  if ($cellscount > 0) {

    // Padding.
    for ($j = $cellscount; $j < $cells_per_row; $j++) {
      $cells[] = '&nbsp;';
    }
    $rows[] = array(
      'data' => $cells,
    );
    $cells = array();
  }
}