You are here

public function UnsavedIndexConfiguration::__construct in Search API 8

Constructs a new UnsavedIndexConfiguration.

Parameters

\Drupal\search_api\IndexInterface $index: The index to proxy.

\Drupal\Core\TempStore\SharedTempStore $temp_store: The shared temporary storage to use.

int|string $current_user_id: Either the UID of the currently logged-in user, or the session ID (for anonymous users).

File

src/UnsavedIndexConfiguration.php, line 73

Class

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

Namespace

Drupal\search_api

Code

public function __construct(IndexInterface $index, SharedTempStore $temp_store, $current_user_id) {
  $this->entity = $index;
  $this->tempStore = $temp_store;
  $this->currentUserId = $current_user_id;
}