public function FieldsHelperInterface::createItem in Search API 8
Creates a search item object.
Parameters
\Drupal\search_api\IndexInterface $index: The item's search index.
string $id: The item's (combined) ID.
\Drupal\search_api\Datasource\DatasourceInterface|null $datasource: (optional) The datasource of the item. If not set, it will be determined from the ID and loaded from the index if needed.
Return value
\Drupal\search_api\Item\ItemInterface A search item with the given values.
1 method overrides FieldsHelperInterface::createItem()
- FieldsHelper::createItem in src/
Utility/ FieldsHelper.php - Creates a search item object.
File
- src/
Utility/ FieldsHelperInterface.php, line 176
Class
- FieldsHelperInterface
- Provides an interface for implementations of the fields helper service.
Namespace
Drupal\search_api\UtilityCode
public function createItem(IndexInterface $index, $id, DatasourceInterface $datasource = NULL);