EntityLastInstalledSchemaRepository::setLastInstalledDefinition

public EntityLastInstalledSchemaRepository::setLastInstalledDefinition(EntityTypeInterface $entity_type)

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 40

Class

EntityLastInstalledSchemaRepository
Provides a repository for installed entity definitions.

Namespace

Drupal\Core\Entity

Code

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;
}
doc_Drupal
2016-10-29 09:06:47
Comments
Leave a Comment

Please login to continue.