You are here

public function NodeAsContentDeriver::getDerivativeDefinitions in Group 8

.

Overrides DeriverBase::getDerivativeDefinitions

File

tests/modules/group_test_plugin/src/Plugin/GroupContentEnabler/NodeAsContentDeriver.php, line 13

Class

NodeAsContentDeriver

Namespace

Drupal\group_test_plugin\Plugin\GroupContentEnabler

Code

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;
}