3 namespace Drupal\search\Plugin\views\row;
5 use Drupal\Core\Form\FormStateInterface;
6 use Drupal\views\Plugin\views\row\RowPluginBase;
9 * Row handler plugin for displaying search results.
13 * title = @Translation("Search results"),
14 * help = @Translation("Provides a row plugin to display search results.")
17 class SearchRow extends RowPluginBase {
22 protected function defineOptions() {
23 $options = parent::defineOptions();
25 $options['score'] = ['default' => TRUE];
33 public function buildOptionsForm(&$form, FormStateInterface $form_state) {
35 '#type' => 'checkbox',
36 '#title' => $this->t('Display score'),
37 '#default_value' => $this->options['score'],
44 public function render($row) {
46 '#theme' => $this->themeFunctions(),
47 '#view' => $this->view,
48 '#options' => $this->options,