You are here

public function SearchApiFieldTrait::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.

See also

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

1 call to SearchApiFieldTrait::render_item()
SearchApiDate::render_item in src/Plugin/views/field/SearchApiDate.php
Renders a single item of a row.
2 methods override SearchApiFieldTrait::render_item()
SearchApiEntityField::render_item in src/Plugin/views/field/SearchApiEntityField.php
Renders a single item of a row.
SearchApiStandard::render_item in src/Plugin/views/field/SearchApiStandard.php
Renders a single item of a row.

File

src/Plugin/views/field/SearchApiFieldTrait.php, line 1168

Class

SearchApiFieldTrait
Provides a trait to use for Search API Views field handlers.

Namespace

Drupal\search_api\Plugin\views\field

Code

public function render_item($count, $item) {
  $this->overriddenValues[NULL] = $item['value'];
  $render = $this
    ->render(new ResultRow());
  $this->overriddenValues = [];
  return $render;
}