You are here

class NodeAsContentDeriver in Group 8

Hierarchy

Expanded class hierarchy of NodeAsContentDeriver

File

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

Namespace

Drupal\group_test_plugin\Plugin\GroupContentEnabler
View 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

Namesort descending Modifiers Type Description Overrides
DeriverBase::$derivatives protected property List of derivative definitions. 1
DeriverBase::getDerivativeDefinition public function Gets the definition of a derivative plugin. Overrides DeriverInterface::getDerivativeDefinition
NodeAsContentDeriver::getDerivativeDefinitions public function . Overrides DeriverBase::getDerivativeDefinitions