You are here

public function SearchApiEntityField::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()

File

src/Plugin/views/field/SearchApiEntityField.php, line 252

Class

SearchApiEntityField
Displays entity field data.

Namespace

Drupal\search_api\Plugin\views\field

Code

public function render_item($count, $item) {
  if (!$this->options['field_rendering']) {
    if ($this->fallbackHandler instanceof MultiItemsFieldHandlerInterface) {
      return $this->fallbackHandler
        ->render_item($count, $item);
    }
    return '';
  }
  return parent::render_item($count, $item);
}