function EntityReference::defineOptions
Same name in this branch
- 11.x core/modules/views/src/Plugin/views/row/EntityReference.php \Drupal\views\Plugin\views\row\EntityReference::defineOptions()
- 11.x core/modules/views/src/Plugin/views/style/EntityReference.php \Drupal\views\Plugin\views\style\EntityReference::defineOptions()
- 11.x core/modules/views/src/Plugin/views/filter/EntityReference.php \Drupal\views\Plugin\views\filter\EntityReference::defineOptions()
Same name in other branches
- 9 core/modules/views/src/Plugin/views/row/EntityReference.php \Drupal\views\Plugin\views\row\EntityReference::defineOptions()
- 9 core/modules/views/src/Plugin/views/display/EntityReference.php \Drupal\views\Plugin\views\display\EntityReference::defineOptions()
- 9 core/modules/views/src/Plugin/views/style/EntityReference.php \Drupal\views\Plugin\views\style\EntityReference::defineOptions()
- 8.9.x core/modules/views/src/Plugin/views/row/EntityReference.php \Drupal\views\Plugin\views\row\EntityReference::defineOptions()
- 8.9.x core/modules/views/src/Plugin/views/display/EntityReference.php \Drupal\views\Plugin\views\display\EntityReference::defineOptions()
- 8.9.x core/modules/views/src/Plugin/views/style/EntityReference.php \Drupal\views\Plugin\views\style\EntityReference::defineOptions()
- 10 core/modules/views/src/Plugin/views/row/EntityReference.php \Drupal\views\Plugin\views\row\EntityReference::defineOptions()
- 10 core/modules/views/src/Plugin/views/display/EntityReference.php \Drupal\views\Plugin\views\display\EntityReference::defineOptions()
- 10 core/modules/views/src/Plugin/views/style/EntityReference.php \Drupal\views\Plugin\views\style\EntityReference::defineOptions()
Overrides DisplayPluginBase::defineOptions
File
-
core/
modules/ views/ src/ Plugin/ views/ display/ EntityReference.php, line 91
Class
- EntityReference
- The plugin that handles an EntityReference display.
Namespace
Drupal\views\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'] = [
'default' => 'entity_reference',
];
$options['defaults']['default']['style'] = FALSE;
$options['row']['contains']['type'] = [
'default' => 'entity_reference',
];
$options['defaults']['default']['row'] = FALSE;
// Set the display title to an empty string (not used in this display type).
$options['title']['default'] = '';
$options['defaults']['default']['title'] = FALSE;
return $options;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.