public function 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;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!EntityLastInstalledSchemaRepository.php/function/EntityLastInstalledSchemaRepository::setLastInstalledDefinition/8.1.x