You are here

public function GroupType::hasContentPlugin in Group 8

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

Checks whether a content enabler plugin is installed for this group type.

Parameters

string $plugin_id: The ID of the content enabler plugin to check for.

Return value

bool Whether the content enabler plugin is installed.

Overrides GroupTypeInterface::hasContentPlugin

File

src/Entity/GroupType.php, line 327

Class

GroupType
Defines the Group type configuration entity.

Namespace

Drupal\group\Entity

Code

public function hasContentPlugin($plugin_id) {
  $installed = $this
    ->getContentEnablerManager()
    ->getInstalledIds($this);
  return in_array($plugin_id, $installed);
}