You are here

public function Blocktabs::addTab in Block Tabs 8

Saves a tab for this blocktabs.

Parameters

array $configuration: An array of tab configuration.

Return value

string The tab ID.

Overrides BlocktabsInterface::addTab

File

src/Entity/Blocktabs.php, line 162

Class

Blocktabs
Defines a blocktabs configuration entity.

Namespace

Drupal\blocktabs\Entity

Code

public function addTab(array $configuration) {
  $configuration['uuid'] = $this
    ->uuidGenerator()
    ->generate();
  $this
    ->getTabs()
    ->addInstanceId($configuration['uuid'], $configuration);
  return $configuration['uuid'];
}