protected function ViewDisplay::defineOptions in Entity Reference View Widget 8
Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::defineOptions().
Overrides DisplayPluginBase::defineOptions
File
- src/
Plugin/ views/ display/ ViewDisplay.php, line 41 - Definition of Drupal\entity_reference_view_widget\Plugin\views\display\ViewDisplay.
Class
- ViewDisplay
- The plugin that handles an Entity Reference View Widget display.
Namespace
Drupal\entity_reference_view_widget\Plugin\views\displayCode
protected function defineOptions() {
$options = parent::defineOptions();
// Force the style plugin to 'entity_reference_style' and the row plugin to
// 'fields'.
$options['style']['contains']['type'] = array(
'default' => 'table',
);
$options['defaults']['default']['style'] = FALSE;
$options['row']['contains']['type'] = array(
'default' => 'fields',
);
$options['defaults']['default']['row'] = FALSE;
$options['use_ajax']['default'] = TRUE;
return $options;
}