function EntityTypeManager::hasHandler

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityTypeManager.php \Drupal\Core\Entity\EntityTypeManager::hasHandler()
  2. 8.9.x core/lib/Drupal/Core/Entity/EntityTypeManager.php \Drupal\Core\Entity\EntityTypeManager::hasHandler()
  3. 10 core/lib/Drupal/Core/Entity/EntityTypeManager.php \Drupal\Core\Entity\EntityTypeManager::hasHandler()

Overrides EntityTypeManagerInterface::hasHandler

File

core/lib/Drupal/Core/Entity/EntityTypeManager.php, line 180

Class

EntityTypeManager
Manages entity type plugin definitions.

Namespace

Drupal\Core\Entity

Code

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.