public function TBMegaMenuBuilder::getIdColumn in The Better Mega Menu 2.x
Same name and namespace in other branches
- 8 src/TBMegaMenuBuilder.php \Drupal\tb_megamenu\TBMegaMenuBuilder::getIdColumn()
Get Id of column.
Parameters
int $number_columns: The number of columns.
Return value
string The column id.
Overrides TBMegaMenuBuilderInterface::getIdColumn
File
- src/
TBMegaMenuBuilder.php, line 222
Class
- TBMegaMenuBuilder
- Defines a TBMegaMenuBuilder.
Namespace
Drupal\tb_megamenuCode
public function getIdColumn(int $number_columns) {
$value =& drupal_static('column');
if (!isset($value)) {
$value = 1;
}
elseif (!$number_columns || $value < $number_columns) {
$value++;
}
return "tb-megamenu-column-{$value}";
}