public function EntityLastInstalledSchemaRepository::setLastInstalledDefinition in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepository.php \Drupal\Core\Entity\EntityLastInstalledSchemaRepository::setLastInstalledDefinition()
Stores the entity type definition in the application state.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition.
Return value
$this
Overrides EntityLastInstalledSchemaRepositoryInterface::setLastInstalledDefinition
File
- core/
lib/ Drupal/ Core/ Entity/ EntityLastInstalledSchemaRepository.php, line 45 - Contains \Drupal\Core\Entity\EntityLastInstalledSchemaRepository.
Class
- EntityLastInstalledSchemaRepository
- Provides a repository for installed entity definitions.
Namespace
Drupal\Core\EntityCode
public function setLastInstalledDefinition(EntityTypeInterface $entity_type) {
$entity_type_id = $entity_type
->id();
$this->keyValueFactory
->get('entity.definitions.installed')
->set($entity_type_id . '.entity_type', $entity_type);
return $this;
}