You are here

public function EntityTypeManagerInterface::createHandlerInstance in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Entity/EntityTypeManagerInterface.php \Drupal\Core\Entity\EntityTypeManagerInterface::createHandlerInstance()

Creates new handler instance.

Usually \Drupal\Core\Entity\EntityManagerInterface::getHandler() is preferred since that method has additional checking that the class exists and has static caches.

Parameters

mixed $class: The handler class to instantiate.

\Drupal\Core\Entity\EntityTypeInterface $definition: The entity type definition.

Return value

object A handler instance.

2 methods override EntityTypeManagerInterface::createHandlerInstance()
EntityManager::createHandlerInstance in core/lib/Drupal/Core/Entity/EntityManager.php
EntityTypeManager::createHandlerInstance in core/lib/Drupal/Core/Entity/EntityTypeManager.php
Creates new handler instance.

File

core/lib/Drupal/Core/Entity/EntityTypeManagerInterface.php, line 130
Contains \Drupal\Core\Entity\EntityTypeManagerInterface.

Class

EntityTypeManagerInterface
Provides an interface for entity type managers.

Namespace

Drupal\Core\Entity

Code

public function createHandlerInstance($class, EntityTypeInterface $definition = NULL);