You are here

public function GroupRelationManagerInterface::getHandler in Group 2.0.x

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 GroupRelationManagerInterface::getHandler()
GroupRelationManager::getHandler in src/Plugin/Group/Relation/GroupRelationManager.php
Returns a handler instance for the given plugin and handler.

File

src/Plugin/Group/Relation/GroupRelationManagerInterface.php, line 34

Class

GroupRelationManagerInterface
Provides a common interface for group relation managers.

Namespace

Drupal\group\Plugin\Group\Relation

Code

public function getHandler($plugin_id, $handler_type);