You are here

public function GroupType::hasContentPlugin in Group 2.0.x

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

Checks whether a group relation plugin is installed for this group type.

Parameters

string $plugin_id: The ID of the group relation plugin to check for.

Return value

bool Whether the group relation 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);
}