You are here

public function ElasticsearchViewsEntityField::init in Elasticsearch Connector 8.2

Same name and namespace in other branches
  1. 8.7 modules/elasticsearch_connector_views/src/Plugin/views/field/ElasticsearchViewsEntityField.php \Drupal\elasticsearch_connector_views\Plugin\views\field\ElasticsearchViewsEntityField::init()
  2. 8.5 modules/elasticsearch_connector_views/src/Plugin/views/field/ElasticsearchViewsEntityField.php \Drupal\elasticsearch_connector_views\Plugin\views\field\ElasticsearchViewsEntityField::init()
  3. 8.6 modules/elasticsearch_connector_views/src/Plugin/views/field/ElasticsearchViewsEntityField.php \Drupal\elasticsearch_connector_views\Plugin\views\field\ElasticsearchViewsEntityField::init()

Initialize the plugin.

Parameters

\Drupal\views\ViewExecutable $view: The view object.

\Drupal\views\Plugin\views\display\DisplayPluginBase $display: The display handler.

array $options: The options configured for this plugin.

Overrides EntityField::init

File

modules/elasticsearch_connector_views/src/Plugin/views/field/ElasticsearchViewsEntityField.php, line 46

Class

ElasticsearchViewsEntityField
Displays entity field data.

Namespace

Drupal\elasticsearch_connector_views\Plugin\views\field

Code

public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {

  // Prepare our fallback handler.
  $fallback_handler_id = !empty($this->definition['fallback_handler']) ? $this->definition['fallback_handler'] : 'elasticsearch_connector_views_standard';
  $this->fallbackHandler = Views::handlerManager('field')
    ->getHandler($options, $fallback_handler_id);
  $options += array(
    'fallback_options' => array(),
  );
  $fallback_options = $options['fallback_options'] + $options;
  $this->fallbackHandler
    ->init($view, $display, $fallback_options);
  parent::init($view, $display, $options);
}