public function ElasticsearchViewsEntityField::init in Elasticsearch Connector 8.7
Same name and namespace in other branches
- 8.2 modules/elasticsearch_connector_views/src/Plugin/views/field/ElasticsearchViewsEntityField.php \Drupal\elasticsearch_connector_views\Plugin\views\field\ElasticsearchViewsEntityField::init()
- 8.5 modules/elasticsearch_connector_views/src/Plugin/views/field/ElasticsearchViewsEntityField.php \Drupal\elasticsearch_connector_views\Plugin\views\field\ElasticsearchViewsEntityField::init()
- 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 44
Class
- ElasticsearchViewsEntityField
- Displays entity field data.
Namespace
Drupal\elasticsearch_connector_views\Plugin\views\fieldCode
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);
}