class GroupNodeDeriver in Group 8
Hierarchy
- class \Drupal\Component\Plugin\Derivative\DeriverBase implements DeriverInterface
- class \Drupal\gnode\Plugin\GroupContentEnabler\GroupNodeDeriver
Expanded class hierarchy of GroupNodeDeriver
File
- modules/
gnode/ src/ Plugin/ GroupContentEnabler/ GroupNodeDeriver.php, line 8
Namespace
Drupal\gnode\Plugin\GroupContentEnablerView source
class GroupNodeDeriver extends DeriverBase {
/**
* {@inheritdoc}.
*/
public function getDerivativeDefinitions($base_plugin_definition) {
$this->derivatives = [];
foreach (NodeType::loadMultiple() as $name => $node_type) {
$label = $node_type
->label();
$this->derivatives[$name] = [
'entity_bundle' => $name,
'label' => t('Group node (@type)', [
'@type' => $label,
]),
'description' => t('Adds %type content to groups both publicly and privately.', [
'%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:: |
|
GroupNodeDeriver:: |
public | function |
. Overrides DeriverBase:: |