You are here

public function FieldsHelper::isFieldIdReserved in Search API 8

Determines whether a field ID is reserved for special use.

We define all field IDs starting with "search_api_" as reserved, to be safe for future additions (and from clashing with backend-defined fields).

Parameters

string $fieldId: The field ID.

Return value

bool TRUE if the field ID is reserved, FALSE if it can be used normally.

Overrides FieldsHelperInterface::isFieldIdReserved

1 call to FieldsHelper::isFieldIdReserved()
FieldsHelper::getNewFieldId in src/Utility/FieldsHelper.php
Finds a new unique field identifier on the given index.

File

src/Utility/FieldsHelper.php, line 401

Class

FieldsHelper
Provides helper methods for dealing with Search API fields and properties.

Namespace

Drupal\search_api\Utility

Code

public function isFieldIdReserved($fieldId) {
  return substr($fieldId, 0, 11) == 'search_api_';
}