Commit f9ca1c02 authored by alexpott's avatar alexpott

-m

parent 3bcb50a2
......@@ -54,9 +54,6 @@ protected function defineOptions() {
$options['row']['contains']['type'] = ['default' => 'entity_reference'];
$options['defaults']['default']['row'] = FALSE;
// Make sure the query is not cached.
$options['defaults']['default']['cache'] = FALSE;
// Set the display title to an empty string (not used in this display type).
$options['title']['default'] = '';
$options['defaults']['default']['title'] = FALSE;
......@@ -65,13 +62,12 @@ protected function defineOptions() {
}
/**
* Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::optionsSummary().
*
* Disable 'cache' and 'title' so it won't be changed.
* {@inheritdoc}
*/
public function optionsSummary(&$categories, &$options) {
parent::optionsSummary($categories, $options);
unset($options['query']);
// Disable 'title' so it won't be changed from the default set in
// \Drupal\views\Plugin\views\display\EntityReference::defineOptions.
unset($options['title']);
}
......
......@@ -125,6 +125,10 @@ protected function setUp($import_test_views = TRUE) {
* Tests the entity reference display plugin.
*/
public function testEntityReferenceDisplay() {
// Test that the 'title' settings are not shown.
$this->drupalGet('admin/structure/views/view/test_display_entity_reference/edit/entity_reference_1');
$this->assertSession()->linkByHrefNotExists('admin/structure/views/nojs/display/test_display_entity_reference/entity_reference_1/title');
// Add the new field to the fields.
$this->drupalPostForm('admin/structure/views/nojs/add-handler/test_display_entity_reference/default/field', ['name[entity_test__' . $this->fieldName . '.' . $this->fieldName . ']' => TRUE], t('Add and configure fields'));
$this->drupalPostForm(NULL, [], t('Apply'));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment