function EntityTypeManager::hasHandler
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Entity/EntityTypeManager.php \Drupal\Core\Entity\EntityTypeManager::hasHandler()
- 9 core/lib/Drupal/Core/Entity/EntityTypeManager.php \Drupal\Core\Entity\EntityTypeManager::hasHandler()
- 8.9.x core/lib/Drupal/Core/Entity/EntityTypeManager.php \Drupal\Core\Entity\EntityTypeManager::hasHandler()
- main core/lib/Drupal/Core/Entity/EntityTypeManager.php \Drupal\Core\Entity\EntityTypeManager::hasHandler()
Checks whether a certain entity type has a certain handler.
Parameters
string $entity_type_id: The ID of the entity type.
string $handler_type: The name of the handler.
Return value
bool Returns TRUE if the entity type has the handler, else FALSE.
Overrides EntityTypeManagerInterface::hasHandler
File
-
core/
lib/ Drupal/ Core/ Entity/ EntityTypeManager.php, line 183
Class
- EntityTypeManager
- Manages entity type plugin definitions.
Namespace
Drupal\Core\EntityCode
public function hasHandler($entity_type_id, $handler_type) {
if ($definition = $this->getDefinition($entity_type_id, FALSE)) {
return $definition->hasHandlerClass($handler_type);
}
return FALSE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.