function EntityTypeManager::getActiveDefinition
Gets the active definition for a content entity type.
@internal
Parameters
string $entity_type_id: The entity type ID.
Return value
\Drupal\Core\Entity\EntityTypeInterface The active entity type definition.
File
-
core/
lib/ Drupal/ Core/ Entity/ EntityTypeManager.php, line 156
Class
- EntityTypeManager
- Manages entity type plugin definitions.
Namespace
Drupal\Core\EntityCode
public function getActiveDefinition($entity_type_id) {
$definition = $this->entityLastInstalledSchemaRepository
->getLastInstalledDefinition($entity_type_id);
return $definition ?: $this->getDefinition($entity_type_id);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.