class GroupContentMenuDeriver in Group Content Menu 8
Group menu deriver.
Hierarchy
- class \Drupal\Component\Plugin\Derivative\DeriverBase implements DeriverInterface
- class \Drupal\group_content_menu\Plugin\GroupContentEnabler\GroupContentMenuDeriver uses StringTranslationTrait
Expanded class hierarchy of GroupContentMenuDeriver
File
- src/
Plugin/ GroupContentEnabler/ GroupContentMenuDeriver.php, line 12
Namespace
Drupal\group_content_menu\Plugin\GroupContentEnablerView source
class GroupContentMenuDeriver extends DeriverBase {
use StringTranslationTrait;
/**
* {@inheritdoc}
*/
public function getDerivativeDefinitions($base_plugin_definition) {
foreach (GroupContentMenuType::loadMultiple() as $name => $group_menu_type) {
$label = $group_menu_type
->label();
$this->derivatives[$name] = [
'entity_bundle' => $name,
'label' => $this
->t('Group menu (@type)', [
'@type' => $label,
]),
'description' => $this
->t('Adds %type menu items to groups.', [
'%type' => $label,
]),
] + $base_plugin_definition;
}
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:: |
|
GroupContentMenuDeriver:: |
public | function |
Gets the definition of all derivatives of a base plugin. Overrides DeriverBase:: |
|
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |