You are here

SearchApiSelectForm.php in Entity Browser 8

Same filename and directory in other branches
  1. 8.2 src/Plugin/views/field/SearchApiSelectForm.php

File

src/Plugin/views/field/SearchApiSelectForm.php
View source
<?php

namespace Drupal\entity_browser\Plugin\views\field;

use Drupal\views\ResultRow;

/**
 * Defines a bulk operation form element that works with entity browser.
 *
 * @ViewsField("entity_browser_search_api_select")
 */
class SearchApiSelectForm extends SelectForm {

  /**
   * {@inheritdoc}
   */
  public function getRowId(ResultRow $row) {
    $entity = $row->_object
      ->getValue();
    return $entity
      ->getEntityTypeId() . ':' . $entity
      ->id();
  }

}

Classes

Namesort descending Description
SearchApiSelectForm Defines a bulk operation form element that works with entity browser.