SearchApiStandard.php in Search API 8
Same filename in this branch
Namespace
Drupal\search_api\Plugin\views\fieldFile
src/Plugin/views/field/SearchApiStandard.phpView source
<?php
namespace Drupal\search_api\Plugin\views\field;
use Drupal\views\Plugin\views\field\FieldPluginBase;
use Drupal\views\Plugin\views\field\MultiItemsFieldHandlerInterface;
/**
* Provides a default handler for fields in Search API Views.
*
* @ingroup views_field_handlers
*
* @ViewsField("search_api")
*/
class SearchApiStandard extends FieldPluginBase implements MultiItemsFieldHandlerInterface {
use SearchApiFieldTrait;
/**
* {@inheritdoc}
*/
public function render_item($count, $item) {
$type = $this->definition['filter_type'] ?? 'plain';
return $this
->sanitizeValue($item['value'], $type);
}
}
Classes
Name![]() |
Description |
---|---|
SearchApiStandard | Provides a default handler for fields in Search API Views. |