/** * {@inheritdoc} */ public function installFieldStorageDefinition($name, $entity_type_id, $provider, FieldStorageDefinitionInterface $storage_definition) { // @todo Pass a mutable field definition interface when we have one. See // https://www.drupal.org/node/2346329. if ($storage_definition instanceof BaseFieldDefinition) { $storage_definition->setName($name)->setTargetEntityTypeId($entity_type_id)->setProvider($provider)->setTargetBundle(NULL); } $this->entityManager->clearCachedDefinitions(); $this->entityManager->onFieldStorageDefinitionCreate($storage_definition); }