You are here

public function TBMegaMenuBuilder::removeColumn in The Better Mega Menu 8

Same name and namespace in other branches
  1. 2.x src/TBMegaMenuBuilder.php \Drupal\tb_megamenu\TBMegaMenuBuilder::removeColumn()

Remove a column from the TB config.

Parameters

array $tb_item: The individual menu item.

int|string $row_delta: The delta for the current row.

int|string $col_delta: The delta for the current column.

int|string $item_delta: The delta for the current item.

array $item_config: The current configuration for all items.

Overrides TBMegaMenuBuilderInterface::removeColumn

1 call to TBMegaMenuBuilder::removeColumn()
TBMegaMenuBuilder::syncConfig in src/TBMegaMenuBuilder.php
Populate the item_config values.

File

src/TBMegaMenuBuilder.php, line 417

Class

TBMegaMenuBuilder
Defines a TBMegaMenuBuilder.

Namespace

Drupal\tb_megamenu

Code

public function removeColumn(array $tb_item, $row_delta, $col_delta, $item_delta, array &$item_config) {
  if (empty($tb_item)) {
    unset($item_config['rows_content'][$row_delta][$col_delta]['col_content'][$item_delta]);
  }
  $this->logger
    ->warning("Unknown / invalid column content: <pre>@content</pre>", [
    '@content' => print_r($tb_item, TRUE),
  ]);
}