class QuickTabsBlock in Quick Tabs 8.3
Same name in this branch
- 8.3 src/Plugin/Derivative/QuickTabsBlock.php \Drupal\quicktabs\Plugin\Derivative\QuickTabsBlock
- 8.3 src/Plugin/Block/QuickTabsBlock.php \Drupal\quicktabs\Plugin\Block\QuickTabsBlock
Provides block plugin definitions for quicktabs blocks.
Hierarchy
- class \Drupal\Component\Plugin\Derivative\DeriverBase implements DeriverInterface
- class \Drupal\quicktabs\Plugin\Derivative\QuickTabsBlock
Expanded class hierarchy of QuickTabsBlock
See also
\Drupal\mymodule\Plugin\Block\QuickTabsBlock
File
- src/
Plugin/ Derivative/ QuickTabsBlock.php, line 12
Namespace
Drupal\quicktabs\Plugin\DerivativeView source
class QuickTabsBlock extends DeriverBase {
/**
* {@inheritdoc}
*/
public function getDerivativeDefinitions($base_plugin_definition) {
foreach (\Drupal::entityTypeManager()
->getStorage('quicktabs_instance')
->loadMultiple() as $machine_name => $entity) {
$this->derivatives[$machine_name] = $base_plugin_definition;
$this->derivatives[$machine_name]['admin_label'] = 'QuickTabs - ' . $entity
->label();
}
return parent::getDerivativeDefinitions($base_plugin_definition);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DeriverBase:: |
protected | property | List of derivative definitions. | 1 |
DeriverBase:: |
public | function |
Gets the definition of a derivative plugin. Overrides DeriverInterface:: |
|
QuickTabsBlock:: |
public | function |
Gets the definition of all derivatives of a base plugin. Overrides DeriverBase:: |