public function GroupType::getContentPlugin in Group 8
Same name and namespace in other branches
- 2.0.x src/Entity/GroupType.php \Drupal\group\Entity\GroupType::getContentPlugin()
Gets an installed content enabler 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 content enabler plugin.
Return value
\Drupal\group\Plugin\GroupContentEnablerInterface The installed content enabler 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);
}