public function GroupContentEnablerManagerInterface::getHandler in Group 8
Returns a handler instance for the given plugin and handler.
Entity handlers are instantiated once per entity type and then cached in the entity type manager, and so subsequent calls to getHandler() for a particular entity type and handler type will return the same object. This means that properties on a handler may be used as a static cache, although as the handler is common to all entities of the same type, any data that is per-entity should be keyed by the entity ID.
Parameters
string $plugin_id: The plugin ID for this handler.
string $handler_type: The handler type to create an instance for.
Return value
object A handler instance.
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
1 method overrides GroupContentEnablerManagerInterface::getHandler()
- GroupContentEnablerManager::getHandler in src/
Plugin/ GroupContentEnablerManager.php - Returns a handler instance for the given plugin and handler.
File
- src/
Plugin/ GroupContentEnablerManagerInterface.php, line 48
Class
- GroupContentEnablerManagerInterface
- Provides a common interface for group content enabler managers.
Namespace
Drupal\group\PluginCode
public function getHandler($plugin_id, $handler_type);