You are here

public function GroupContentEnablerBase::__construct in Group 8

Constructs a \Drupal\Component\Plugin\PluginBase object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

Overrides PluginBase::__construct

File

src/Plugin/GroupContentEnablerBase.php, line 44

Class

GroupContentEnablerBase
Provides a base class for GroupContentEnabler plugins.

Namespace

Drupal\group\Plugin

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);

  // Only support setting the group type ID during construction.
  if (!empty($configuration['group_type_id'])) {
    $this->groupTypeId = $configuration['group_type_id'];
  }

  // Include the default configuration by calling ::setConfiguration().
  $this
    ->setConfiguration($configuration);
}