You are here

public function IndexInterface::renameField in Search API 8

Changes the field ID of a field.

Parameters

string $old_field_id: The old ID of the field.

string $new_field_id: The new ID of the field.

Return value

$this

Throws

\Drupal\search_api\SearchApiException Thrown if no field with the old ID exists, or because the new ID is already taken, or because the new field ID is one of the pseudo-fields that can be used in search queries.

2 methods override IndexInterface::renameField()
Index::renameField in src/Entity/Index.php
Changes the field ID of a field.
UnsavedIndexConfiguration::renameField in src/UnsavedIndexConfiguration.php
Changes the field ID of a field.

File

src/IndexInterface.php, line 443

Class

IndexInterface
Defines the interface for index entities.

Namespace

Drupal\search_api

Code

public function renameField($old_field_id, $new_field_id);