class NodeAsContentDeriver in Group 8
Hierarchy
- class \Drupal\Component\Plugin\Derivative\DeriverBase implements DeriverInterface
- class \Drupal\group_test_plugin\Plugin\GroupContentEnabler\NodeAsContentDeriver
Expanded class hierarchy of NodeAsContentDeriver
File
- tests/
modules/ group_test_plugin/ src/ Plugin/ GroupContentEnabler/ NodeAsContentDeriver.php, line 8
Namespace
Drupal\group_test_plugin\Plugin\GroupContentEnablerView source
class NodeAsContentDeriver extends DeriverBase {
/**
* {@inheritdoc}.
*/
public function getDerivativeDefinitions($base_plugin_definition) {
$this->derivatives = [];
$this->derivatives['page'] = [
'entity_bundle' => 'page',
'label' => t('Pages as content'),
'description' => t('Adds pages to groups.'),
] + $base_plugin_definition;
$this->derivatives['article'] = [
'entity_bundle' => 'article',
'label' => t('Article as content'),
'description' => t('Adds articles to groups.'),
] + $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:: |
|
NodeAsContentDeriver:: |
public | function |
. Overrides DeriverBase:: |