You are here

public function TestDatasource::getItemLanguage in Search API 8

Retrieves the item's language.

Parameters

\Drupal\Core\TypedData\ComplexDataInterface $item: An item of this datasource's type.

Return value

string The language code of this item.

Overrides DatasourcePluginBase::getItemLanguage

File

tests/search_api_test/src/Plugin/search_api/datasource/TestDatasource.php, line 41

Class

TestDatasource
Provides a datasource for testing purposes.

Namespace

Drupal\search_api_test\Plugin\search_api\datasource

Code

public function getItemLanguage(ComplexDataInterface $item) {
  return $this
    ->getReturnValue(__FUNCTION__, LanguageInterface::LANGCODE_NOT_SPECIFIED);
}