class WeMegaMenuBlock in Drupal Mega Menu 8
Same name in this branch
- 8 src/Plugin/Derivative/WeMegaMenuBlock.php \Drupal\we_megamenu\Plugin\Derivative\WeMegaMenuBlock
- 8 src/Plugin/Block/WeMegaMenuBlock.php \Drupal\we_megamenu\Plugin\Block\WeMegaMenuBlock
Same name and namespace in other branches
- 8.x src/Plugin/Derivative/WeMegaMenuBlock.php \Drupal\we_megamenu\Plugin\Derivative\WeMegaMenuBlock
Provides blocks which belong to Drupal 8 Mega Menu.
Hierarchy
- class \Drupal\Component\Plugin\Derivative\DeriverBase implements DeriverInterface
- class \Drupal\we_megamenu\Plugin\Derivative\WeMegaMenuBlock
Expanded class hierarchy of WeMegaMenuBlock
File
- src/
Plugin/ Derivative/ WeMegaMenuBlock.php, line 10
Namespace
Drupal\we_megamenu\Plugin\DerivativeView source
class WeMegaMenuBlock extends DeriverBase {
/**
* {@inheritdoc}
*/
public function getDerivativeDefinitions($base_plugin_definition) {
$menus = menu_ui_get_menus();
foreach ($menus as $menu => $title) {
$this->derivatives[$menu] = $base_plugin_definition;
$this->derivatives[$menu]['admin_label'] = $title;
}
return $this->derivatives;
}
}
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:: |
|
WeMegaMenuBlock:: |
public | function |
Gets the definition of all derivatives of a base plugin. Overrides DeriverBase:: |