public function GroupType::getContentPlugin in Group 2.0.x
Same name and namespace in other branches
- 8 src/Entity/GroupType.php \Drupal\group\Entity\GroupType::getContentPlugin()
Gets an installed group relation plugin for this group type.
Warning: In places where the plugin may not be installed on the group type, you should always run ::hasContentPlugin() first or you may risk ending up with crashes or unreliable data.
Parameters
string $plugin_id: The ID of the group relation plugin.
Return value
\Drupal\group\Plugin\Group\Relation\GroupRelationInterface The installed group relation plugin for the group type.
Overrides GroupTypeInterface::getContentPlugin
File
- src/
Entity/ GroupType.php, line 335
Class
- GroupType
- Defines the Group type configuration entity.
Namespace
Drupal\group\EntityCode
public function getContentPlugin($plugin_id) {
return $this
->getInstalledContentPlugins()
->get($plugin_id);
}