public function GroupContentEnablerManager::hasHandler in Group 8
Checks whether a certain plugin has a certain handler.
Parameters
string $plugin_id: The plugin ID for this handler.
string $handler_type: The name of the handler.
Return value
bool Returns TRUE if the plugin has the handler, else FALSE.
Overrides GroupContentEnablerManagerInterface::hasHandler
File
- src/
Plugin/ GroupContentEnablerManager.php, line 123
Class
- GroupContentEnablerManager
- Manages GroupContentEnabler plugin implementations.
Namespace
Drupal\group\PluginCode
public function hasHandler($plugin_id, $handler_type) {
if ($definition = $this
->getDefinition($plugin_id, FALSE)) {
if (isset($definition['handlers'][$handler_type])) {
return class_exists($definition['handlers'][$handler_type]);
}
}
return FALSE;
}