You are here

public function UnsavedIndexConfiguration::discardChanges in Search API 8

Discards the changes represented by this object.

Throws

\Drupal\Core\TempStore\TempStoreException Thrown when a lock for the temp storage could not be acquired.

Overrides UnsavedConfigurationInterface::discardChanges

1 call to UnsavedIndexConfiguration::discardChanges()
UnsavedIndexConfiguration::savePermanent in src/UnsavedIndexConfiguration.php
Saves the changes represented by this object permanently.

File

src/UnsavedIndexConfiguration.php, line 190

Class

UnsavedIndexConfiguration
Represents a configuration of an index that was not yet permanently saved.

Namespace

Drupal\search_api

Code

public function discardChanges() {
  $this->tempStore
    ->delete($this->entity
    ->id());
}