You are here

public function ItemInterface::setExtraData in Search API 8

Sets some extra data for this item.

Parameters

string $key: The key for the extra data.

mixed $data: (optional) The data to set. If NULL, remove the extra data with the given key instead.

Return value

$this

1 method overrides ItemInterface::setExtraData()
Item::setExtraData in src/Item/Item.php
Sets some extra data for this item.

File

src/Item/ItemInterface.php, line 287

Class

ItemInterface
Represents a search item being indexed or returned as a search result.

Namespace

Drupal\search_api\Item

Code

public function setExtraData($key, $data = NULL);