You are here

public function SearchApiStandard::render_item in Search API 8

Renders a single item of a row.

Parameters

int $count: The index of the item inside the row.

mixed $item: The item for the field to render.

Return value

string The rendered output.

Overrides SearchApiFieldTrait::render_item

See also

\Drupal\views\Plugin\views\field\MultiItemsFieldHandlerInterface::render_item()

1 call to SearchApiStandard::render_item()
SearchApiEntity::render_item in src/Plugin/views/field/SearchApiEntity.php
Renders a single item of a row.
1 method overrides SearchApiStandard::render_item()
SearchApiEntity::render_item in src/Plugin/views/field/SearchApiEntity.php
Renders a single item of a row.

File

src/Plugin/views/field/SearchApiStandard.php, line 22

Class

SearchApiStandard
Provides a default handler for fields in Search API Views.

Namespace

Drupal\search_api\Plugin\views\field

Code

public function render_item($count, $item) {
  $type = $this->definition['filter_type'] ?? 'plain';
  return $this
    ->sanitizeValue($item['value'], $type);
}