You are here

public function GroupContentType::updateContentPlugin in Group 8

Same name and namespace in other branches
  1. 2.0.x src/Entity/GroupContentType.php \Drupal\group\Entity\GroupContentType::updateContentPlugin()

Updates the configuration of the content enabler plugin.

Any keys that were left out will be reset to the default.

Parameters

array $configuration: An array of content enabler plugin configuration.

Overrides GroupContentTypeInterface::updateContentPlugin

File

src/Entity/GroupContentType.php, line 169

Class

GroupContentType
Defines the Group content type configuration entity.

Namespace

Drupal\group\Entity

Code

public function updateContentPlugin(array $configuration) {
  $this->plugin_config = $configuration;
  $this
    ->save();

  // Make sure people get a fresh local plugin instance.
  $this->pluginInstance = NULL;

  // Make sure people get a freshly configured plugin collection.
  $this
    ->getContentEnablerManager()
    ->clearCachedGroupTypeCollections($this
    ->getGroupType());
}