function EntityLastInstalledSchemaRepository::setLastInstalledDefinition

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepository.php \Drupal\Core\Entity\EntityLastInstalledSchemaRepository::setLastInstalledDefinition()
  2. 10 core/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepository.php \Drupal\Core\Entity\EntityLastInstalledSchemaRepository::setLastInstalledDefinition()
  3. 11.x core/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepository.php \Drupal\Core\Entity\EntityLastInstalledSchemaRepository::setLastInstalledDefinition()

Overrides EntityLastInstalledSchemaRepositoryInterface::setLastInstalledDefinition

File

core/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepository.php, line 62

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.