You are here

public function UnsavedIndexConfiguration::createDuplicate in Search API 8

Creates a duplicate of the entity.

Return value

static A clone of $this with all identifiers unset, so saving it inserts a new entity into the storage system.

Overrides EntityInterface::createDuplicate

File

src/UnsavedIndexConfiguration.php, line 944

Class

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

Namespace

Drupal\search_api

Code

public function createDuplicate() {
  return new UnsavedIndexConfiguration($this->entity
    ->createDuplicate(), $this->tempStore, $this->currentUserId);
}