Commit f4d334ed authored by plach's avatar plach

Issue #2993642 by AdamPS, Pancho, jonathanshaw: Mechanism to disable...

Issue #2993642 by AdamPS, Pancho, jonathanshaw: Mechanism to disable preprocessing of base fields in taxonomy and aggregator entity types so they can be configured via the field UI

(cherry picked from commit 9451d021)
parent 36b9d375
...@@ -85,9 +85,19 @@ function aggregator_theme() { ...@@ -85,9 +85,19 @@ function aggregator_theme() {
/** /**
* Implements hook_entity_extra_field_info(). * Implements hook_entity_extra_field_info().
*
* By default this function creates pseudo-fields that mask the description and
* image base fields. These pseudo-fields are omitted if:
* - a module makes the field's display configurable via the field UI by means
* of BaseFieldDefinition::setDisplayConfigurable()
* - AND the additional entity type property
* 'enable_base_field_custom_preprocess_skipping' has been set using
* hook_entity_type_build().
*/ */
function aggregator_entity_extra_field_info() { function aggregator_entity_extra_field_info() {
$extra = []; $extra = [];
$entity_type_manager = \Drupal::entityTypeManager();
$entity_field_manager = \Drupal::service('entity_field.manager');
$extra['aggregator_feed']['aggregator_feed'] = [ $extra['aggregator_feed']['aggregator_feed'] = [
'display' => [ 'display' => [
...@@ -96,18 +106,6 @@ function aggregator_entity_extra_field_info() { ...@@ -96,18 +106,6 @@ function aggregator_entity_extra_field_info() {
'description' => t('Items associated with this feed'), 'description' => t('Items associated with this feed'),
'weight' => 0, 'weight' => 0,
], ],
// @todo Move to a formatter at https://www.drupal.org/node/2339917.
'image' => [
'label' => t('Image'),
'description' => t('The feed image'),
'weight' => 2,
],
// @todo Move to a formatter at https://www.drupal.org/node/2149845.
'description' => [
'label' => t('Description'),
'description' => t('The description of this feed'),
'weight' => 3,
],
'more_link' => [ 'more_link' => [
'label' => t('More link'), 'label' => t('More link'),
'description' => t('A more link to the feed detail page'), 'description' => t('A more link to the feed detail page'),
...@@ -121,16 +119,45 @@ function aggregator_entity_extra_field_info() { ...@@ -121,16 +119,45 @@ function aggregator_entity_extra_field_info() {
], ],
]; ];
$extra['aggregator_item']['aggregator_item'] = [ // Create Feed image and description pseudo-fields. Skip this if the field
'display' => [ // display is configurable and skipping has been enabled.
// @todo Move to a formatter at https://www.drupal.org/node/2149845. // @todo https://www.drupal.org/project/drupal/issues/3015623
'description' => [ // Eventually delete this code and matching lines in FeedViewBuilder. Using
'label' => t('Description'), // field formatters is more flexible and consistent.
'description' => t('The description of this feed item'), $skip_custom_preprocessing = $entity_type_manager->getDefinition('aggregator_feed')->get('enable_base_field_custom_preprocess_skipping');
'weight' => 2, $base_field_definitions = $entity_field_manager->getBaseFieldDefinitions('aggregator_feed');
],
], if (!$skip_custom_preprocessing || !$base_field_definitions['image']->isDisplayConfigurable('view')) {
]; $extra['aggregator_feed']['aggregator_feed']['display']['image'] = [
'label' => t('Image'),
'description' => t('The feed image'),
'weight' => 2,
];
}
if (!$skip_custom_preprocessing || !$base_field_definitions['description']->isDisplayConfigurable('view')) {
$extra['aggregator_feed']['aggregator_feed']['display']['description'] = [
'label' => t('Description'),
'description' => t('The description of this feed'),
'weight' => 3,
];
}
// Create Item description pseudo-field. Skip this if the field display is
// configurable and skipping has been enabled.
// @todo https://www.drupal.org/project/drupal/issues/3015623
// Eventually delete this code and matching lines in ItemViewBuilder. Using
// field formatters is more flexible and consistent.
$skip_custom_preprocessing = $entity_type_manager->getDefinition('aggregator_item')->get('enable_base_field_custom_preprocess_skipping');
$base_field_definitions = $entity_field_manager->getBaseFieldDefinitions('aggregator_item');
if (!$skip_custom_preprocessing || !$base_field_definitions['description']->isDisplayConfigurable('view')) {
$extra['aggregator_item']['aggregator_item']['display']['description'] = [
'label' => t('Description'),
'description' => t('The description of this feed item'),
'weight' => 2,
];
}
return $extra; return $extra;
} }
......
...@@ -13,6 +13,14 @@ ...@@ -13,6 +13,14 @@
* *
* Default template: aggregator-item.html.twig. * Default template: aggregator-item.html.twig.
* *
* By default this function performs special preprocessing to create a separate
* variable for the title base field. This preprocessing is skipped if:
* - a module makes the field's display configurable via the field UI by means
* of BaseFieldDefinition::setDisplayConfigurable()
* - AND the additional entity type property
* 'enable_base_field_custom_preprocess_skipping' has been set using
* hook_entity_type_build().
*
* @param array $variables * @param array $variables
* An associative array containing: * An associative array containing:
* - elements: An array of elements to display in view mode. * - elements: An array of elements to display in view mode.
...@@ -26,7 +34,16 @@ function template_preprocess_aggregator_item(&$variables) { ...@@ -26,7 +34,16 @@ function template_preprocess_aggregator_item(&$variables) {
} }
$variables['url'] = UrlHelper::stripDangerousProtocols($item->getLink()); $variables['url'] = UrlHelper::stripDangerousProtocols($item->getLink());
$variables['title'] = $item->label();
// Make title field available separately. Skip this custom preprocessing if
// the field display is configurable and skipping has been enabled.
// @todo https://www.drupal.org/project/drupal/issues/3015623
// Eventually delete this code and matching template lines. Using
// $variables['content'] is more flexible and consistent.
$skip_custom_preprocessing = $item->getEntityType()->get('enable_base_field_custom_preprocess_skipping');
if (!$skip_custom_preprocessing || !$item->getFieldDefinition('title')->isDisplayConfigurable('view')) {
$variables['title'] = $item->label();
}
} }
/** /**
...@@ -34,6 +51,14 @@ function template_preprocess_aggregator_item(&$variables) { ...@@ -34,6 +51,14 @@ function template_preprocess_aggregator_item(&$variables) {
* *
* Default template: aggregator-feed.html.twig. * Default template: aggregator-feed.html.twig.
* *
* By default this function performs special preprocessing to create a separate
* variable for the title base field. This preprocessing is skipped if:
* - a module makes the field's display configurable via the field UI by means
* of BaseFieldDefinition::setDisplayConfigurable()
* - AND the additional entity type property
* 'enable_base_field_custom_preprocess_skipping' has been set using
* hook_entity_type_build().
*
* @param array $variables * @param array $variables
* An associative array containing: * An associative array containing:
* - elements: An array of elements to display in view mode. * - elements: An array of elements to display in view mode.
...@@ -46,5 +71,14 @@ function template_preprocess_aggregator_feed(&$variables) { ...@@ -46,5 +71,14 @@ function template_preprocess_aggregator_feed(&$variables) {
$variables['content'][$key] = $variables['elements'][$key]; $variables['content'][$key] = $variables['elements'][$key];
} }
$variables['full'] = $variables['elements']['#view_mode'] == 'full'; $variables['full'] = $variables['elements']['#view_mode'] == 'full';
$variables['title'] = $feed->label();
// Make title field available separately. Skip this custom preprocessing if
// the field display is configurable and skipping has been enabled.
// @todo https://www.drupal.org/project/drupal/issues/3015623
// Eventually delete this code and matching template lines. Using
// $variables['content'] is more flexible and consistent.
$skip_custom_preprocessing = $feed->getEntityType()->get('enable_base_field_custom_preprocess_skipping');
if (!$skip_custom_preprocessing || !$feed->getFieldDefinition('title')->isDisplayConfigurable('view')) {
$variables['title'] = $feed->label();
}
} }
...@@ -99,7 +99,12 @@ public function buildComponents(array &$build, array $entities, array $displays, ...@@ -99,7 +99,12 @@ public function buildComponents(array &$build, array $entities, array $displays,
} }
} }
if ($display->getComponent('description')) { // By default, the description and image fields are exposed as
// pseudo-fields rendered in this function. However they can optionally
// be rendered directly using a field formatter. Skip rendering here if a
// field formatter type is set.
$component = $display->getComponent('description');
if ($component && !isset($component['type'])) {
$build[$id]['description'] = [ $build[$id]['description'] = [
'#markup' => $entity->getDescription(), '#markup' => $entity->getDescription(),
'#allowed_tags' => _aggregator_allowed_tags(), '#allowed_tags' => _aggregator_allowed_tags(),
...@@ -108,7 +113,8 @@ public function buildComponents(array &$build, array $entities, array $displays, ...@@ -108,7 +113,8 @@ public function buildComponents(array &$build, array $entities, array $displays,
]; ];
} }
if ($display->getComponent('image')) { $component = $display->getComponent('image');
if ($component && !isset($component['type'])) {
$image_link = []; $image_link = [];
// Render the image as link if it is available. // Render the image as link if it is available.
$image = $entity->getImage(); $image = $entity->getImage();
......
...@@ -19,7 +19,12 @@ public function buildComponents(array &$build, array $entities, array $displays, ...@@ -19,7 +19,12 @@ public function buildComponents(array &$build, array $entities, array $displays,
$bundle = $entity->bundle(); $bundle = $entity->bundle();
$display = $displays[$bundle]; $display = $displays[$bundle];
if ($display->getComponent('description')) { // By default, the description field is exposed as a pseudo-field
// rendered in this function. However it can optionally be rendered
// directly using a field formatter. Skip rendering here if a field
// formatter type is set.
$component = $display->getComponent('description');
if ($component && !isset($component['type'])) {
$build[$id]['description'] = [ $build[$id]['description'] = [
'#markup' => $entity->getDescription(), '#markup' => $entity->getDescription(),
'#allowed_tags' => _aggregator_allowed_tags(), '#allowed_tags' => _aggregator_allowed_tags(),
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* For example, "example.com/aggregator/sources/1". * For example, "example.com/aggregator/sources/1".
* *
* Available variables: * Available variables:
* - title: Title of the feed item. * - title: (optional) Title of the feed item.
* - content: All field items. Use {{ content }} to print them all, * - content: All field items. Use {{ content }} to print them all,
* or print a subset such as {{ content.field_example }}. Use * or print a subset such as {{ content.field_example }}. Use
* {{ content|without('field_example') }} to temporarily suppress the printing * {{ content|without('field_example') }} to temporarily suppress the printing
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
*/ */
#} #}
{{ title_prefix }} {{ title_prefix }}
{% if not full %} {% if title and not full %}
<h2{{ title_attributes }}>{{ title }}</h2> <h2{{ title_attributes }}>{{ title }}</h2>
{% endif %} {% endif %}
{{ title_suffix }} {{ title_suffix }}
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* *
* Available variables: * Available variables:
* - url: URL to the originating feed item. * - url: URL to the originating feed item.
* - title: Title of the feed item. * - title: (optional) Title of the feed item.
* - content: All field items. Use {{ content }} to print them all, * - content: All field items. Use {{ content }} to print them all,
* or print a subset such as {{ content.field_example }}. Use * or print a subset such as {{ content.field_example }}. Use
* {{ content|without('field_example') }} to temporarily suppress the printing * {{ content|without('field_example') }} to temporarily suppress the printing
...@@ -23,9 +23,11 @@ ...@@ -23,9 +23,11 @@
#} #}
<article{{ attributes }}> <article{{ attributes }}>
{{ title_prefix }} {{ title_prefix }}
<h3> {% if title %}
<a href="{{ url }}">{{ title }}</a> <h3>
</h3> <a href="{{ url }}">{{ title }}</a>
</h3>
{% endif %}
{{ title_suffix }} {{ title_suffix }}
{{ content }} {{ content }}
</article> </article>
name: 'Aggregator configurable display module tests'
type: module
description: 'Support module for aggregator \Drupal\Core\Field\BaseFieldDefinition::setDisplayConfigurable() testing.'
package: Testing
version: VERSION
core: 8.x
<?php
/**
* @file
* A module for testing making aggregator_feed base fields' displays
* configurable.
*/
use Drupal\Core\Entity\EntityTypeInterface;
/**
* Implements hook_entity_base_field_info_alter().
*/
function aggregator_display_configurable_test_entity_base_field_info_alter(&$base_field_definitions, EntityTypeInterface $entity_type) {
/** @var \Drupal\Core\Field\BaseFieldDefinition[] $base_field_definitions */
if ($entity_type->id() === 'aggregator_feed') {
$base_field_definitions['title']->setDisplayConfigurable('view', TRUE);
$base_field_definitions['description']->setDisplayConfigurable('view', TRUE);
$base_field_definitions['image']->setDisplayConfigurable('view', TRUE);
}
if ($entity_type->id() === 'aggregator_item') {
$base_field_definitions['title']->setDisplayConfigurable('view', TRUE);
$options = [
'type' => 'text_default',
'label' => 'above',
];
$base_field_definitions['title']->setDisplayOptions('view', $options);
}
}
/**
* Implements hook_entity_type_build().
*/
function aggregator_display_configurable_test_entity_type_build(array &$entity_types) {
// Allow skipping of extra preprocessing for configurable display.
$entity_types['aggregator_feed']->set('enable_base_field_custom_preprocess_skipping', TRUE);
$entity_types['aggregator_item']->set('enable_base_field_custom_preprocess_skipping', TRUE);
}
<?php
namespace Drupal\Tests\aggregator\Functional;
use Drupal\Core\Entity\Entity\EntityViewDisplay;
use Drupal\node\Entity\Node;
/**
* Tests making aggregator_feed and aggregator_item base fields' displays
* configurable.
*
* @group aggregator
*/
class AggregatorDisplayConfigurableTest extends AggregatorTestBase {
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->drupalPlaceBlock('page_title_block');
}
/**
* Sets feed base fields to configurable display and checks settings are
* respected.
*/
public function testFeedDisplayConfigurable() {
$display = EntityViewDisplay::load('aggregator_feed.aggregator_feed.summary');
$display->setComponent('description', ['region' => 'content'])
->setComponent('items', ['region' => 'hidden'])
->save();
$feed = $this->createFeed($this->getRSS091Sample());
$feed->refreshItems();
$assert = $this->assertSession();
// Check the aggregator_feed with Drupal default non-configurable display.
$this->drupalGet('/aggregator/sources');
$assert->elementTextContains('css', 'div.aggregator-feed > h2', $feed->label());
$assert->elementTextContains('css', 'div.feed-description', $feed->getDescription());
$assert->elementNotExists('css', '.field--name-title');
$assert->elementNotExists('css', '.field--name-description');
// Enable helper module to make base fields' displays configurable.
\Drupal::service('module_installer')->install(['aggregator_display_configurable_test']);
// Configure display.
$display->setComponent('title', [
'type' => 'text_default',
'label' => 'above',
]);
$display->setComponent('description', [
'type' => 'aggregator_xss',
'label' => 'hidden',
])->save();
// Recheck the aggregator_feed with configurable display.
$this->drupalGet('/aggregator/sources');
$assert->elementTextContains('css', 'div.aggregator-feed > div.field--name-title > div.field__item', $feed->label());
$assert->elementExists('css', 'div.field--name-title > div.field__label');
$assert->elementTextContains('css', 'div.field--name-description.field__item', $feed->getDescription());
// Remove 'title' field from display.
$display->removeComponent('title')->save();
// Recheck the aggregator_feed with 'title' field removed from display.
$this->drupalGet('/aggregator/sources');
$assert->elementNotExists('css', 'div.aggregator-feed > div.field--name-title');
}
/**
* Sets item base fields to configurable display and checks settings are
* respected.
*/
public function testItemDisplayConfigurable() {
$this->createSampleNodes(1);
$item = Node::load(1);
$feed = $this->createFeed();
$this->updateFeedItems($feed);
$assert = $this->assertSession();
// Check the aggregator_feed with Drupal default non-configurable display.
$this->drupalGet('/aggregator');
$assert->elementTextContains('css', 'h3.feed-item-title', $item->label());
$assert->elementNotExists('css', '.field--name-title .field__item');
$assert->elementNotExists('css', '.field--name-title .field__label');
// Enable helper module to make base fields' displays configurable.
\Drupal::service('module_installer')->install(['aggregator_display_configurable_test']);
// Recheck the aggregator_feed with configurable display.
$this->drupalGet('/aggregator');
$assert->elementNotExists('css', 'h3.feed-item-title');
$assert->elementTextContains('css', 'div.field--name-title > div.field__item', $item->label());
}
}
...@@ -638,7 +638,7 @@ function template_preprocess_node(&$variables) { ...@@ -638,7 +638,7 @@ function template_preprocess_node(&$variables) {
// preprocessing if the field display is configurable and skipping has been // preprocessing if the field display is configurable and skipping has been
// enabled. // enabled.
// @todo https://www.drupal.org/project/drupal/issues/3015623 // @todo https://www.drupal.org/project/drupal/issues/3015623
// In D9 delete this code and matching template lines. Using // Eventually delete this code and matching template lines. Using
// $variables['content'] is more flexible and consistent. // $variables['content'] is more flexible and consistent.
$submitted_configurable = $node->getFieldDefinition('created')->isDisplayConfigurable('view') || $node->getFieldDefinition('uid')->isDisplayConfigurable('view'); $submitted_configurable = $node->getFieldDefinition('created')->isDisplayConfigurable('view') || $node->getFieldDefinition('uid')->isDisplayConfigurable('view');
if (!$skip_custom_preprocessing || !$submitted_configurable) { if (!$skip_custom_preprocessing || !$submitted_configurable) {
...@@ -670,7 +670,7 @@ function template_preprocess_node(&$variables) { ...@@ -670,7 +670,7 @@ function template_preprocess_node(&$variables) {
// Display post information on certain node types. This only occurs if // Display post information on certain node types. This only occurs if
// custom preprocessing occurred for both of the created and uid fields. // custom preprocessing occurred for both of the created and uid fields.
// @todo https://www.drupal.org/project/drupal/issues/3015623 // @todo https://www.drupal.org/project/drupal/issues/3015623
// In D9 delete this code and matching template lines. Using a field // Eventually delete this code and matching template lines. Using a field
// formatter is more flexible and consistent. // formatter is more flexible and consistent.
$node_type = $node->type->entity; $node_type = $node->type->entity;
// Used by RDF to add attributes around the author and date submitted. // Used by RDF to add attributes around the author and date submitted.
......
...@@ -244,6 +244,15 @@ function taxonomy_theme_suggestions_taxonomy_term(array $variables) { ...@@ -244,6 +244,15 @@ function taxonomy_theme_suggestions_taxonomy_term(array $variables) {
* *
* Default template: taxonomy-term.html.twig. * Default template: taxonomy-term.html.twig.
* *
* By default this function performs special preprocessing to move the name
* base field out of the elements array into a separate variable. This
* preprocessing is skipped if:
* - a module makes the field's display configurable via the field UI by means
* of BaseFieldDefinition::setDisplayConfigurable()
* - AND the additional entity type property
* 'enable_base_field_custom_preprocess_skipping' has been set using
* hook_entity_type_build().
*
* @param array $variables * @param array $variables
* An associative array containing: * An associative array containing:
* - elements: An associative array containing the taxonomy term and any * - elements: An associative array containing the taxonomy term and any
...@@ -260,9 +269,19 @@ function template_preprocess_taxonomy_term(&$variables) { ...@@ -260,9 +269,19 @@ function template_preprocess_taxonomy_term(&$variables) {
$term = $variables['term']; $term = $variables['term'];
$variables['url'] = $term->toUrl()->toString(); $variables['url'] = $term->toUrl()->toString();
// We use name here because that is what appears in the UI.
$variables['name'] = $variables['elements']['name']; // Make name field available separately. Skip this custom preprocessing if
unset($variables['elements']['name']); // the field display is configurable and skipping has been enabled.
// @todo https://www.drupal.org/project/drupal/issues/3015623
// Eventually delete this code and matching template lines. Using
// $variables['content'] is more flexible and consistent.
$skip_custom_preprocessing = $term->getEntityType()->get('enable_base_field_custom_preprocess_skipping');
if (!$skip_custom_preprocessing || !$term->getFieldDefinition('name')->isDisplayConfigurable('view')) {
// We use name here because that is what appears in the UI.
$variables['name'] = $variables['elements']['name'];
unset($variables['elements']['name']);
}
$variables['page'] = $variables['view_mode'] == 'full' && taxonomy_term_is_page($term); $variables['page'] = $variables['view_mode'] == 'full' && taxonomy_term_is_page($term);
// Helpful $content variable for templates. // Helpful $content variable for templates.
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* *
* Available variables: * Available variables:
* - url: URL of the current term. * - url: URL of the current term.
* - name: Name of the current term. * - name: (optional) Name of the current term.
* - content: Items for the content of the term (fields and description). * - content: Items for the content of the term (fields and description).
* Use 'content' to print them all, or print a subset such as * Use 'content' to print them all, or print a subset such as
* 'content.description'. Use the following code to exclude the * 'content.description'. Use the following code to exclude the
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#} #}
<div{{ attributes }}> <div{{ attributes }}>
{{ title_prefix }} {{ title_prefix }}
{% if not page %} {% if name and not page %}
<h2><a href="{{ url }}">{{ name }}</a></h2> <h2><a href="{{ url }}">{{ name }}</a></h2>
{% endif %} {% endif %}
{{ title_suffix }} {{ title_suffix }}
......
name: 'Taxonomy term configurable display module tests'
type: module
description: 'Support module for taxonomy_term \Drupal\Core\Field\BaseFieldDefinition::setDisplayConfigurable() testing.'
package: Testing
version: VERSION
core: 8.x
<?php
/**
* @file
* A module for testing making taxonomy_term base fields' displays
* configurable.
*/
use Drupal\Core\Entity\EntityTypeInterface;
/**
* Implements hook_entity_base_field_info_alter().
*/
function taxonomy_term_display_configurable_test_entity_base_field_info_alter(&$base_field_definitions, EntityTypeInterface $entity_type) {
if ($entity_type->id() === 'taxonomy_term') {
/** @var \Drupal\Core\Field\BaseFieldDefinition[] $base_field_definitions */
$base_field_definitions['name']->setDisplayConfigurable('view', TRUE);
}
}
/**
* Implements hook_entity_type_build().
*/
function taxonomy_term_display_configurable_test_entity_type_build(array &$entity_types) {
// Allow skipping of extra preprocessing for configurable display.
$entity_types['taxonomy_term']->set('enable_base_field_custom_preprocess_skipping', TRUE);
}
langcode: en
status: true
dependencies:
module:
- taxonomy
id: test_term_show_entity
label: test_term_show_entity
module: views
description: ''
tag: ''
base_table: taxonomy_term_field_data
base_field: tid
display:
default:
display_plugin: default
id: default
display_title: Master
position: 0
display_options:
access:
type: none
options: { }
cache:
type: tag
options: { }
query:
type: views_query
options:
disable_sql_rewrite: false
distinct: false
replica: false
query_comment: ''
query_tags: { }
exposed_form:
type: basic
options:
submit_button: Apply
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
expose_sort_order: true
sort_asc_label: Asc
sort_desc_label: Desc
pager:
type: none
options:
offset: 0
style:
type: default
row:
type: 'entity:taxonomy_term'
fields: { }
filters: { }
sorts: { }
header: { }
footer: { }
empty: { }
relationships: { }
arguments: { }
display_extenders: { }
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
tags: { }
page_1:
display_plugin: page
id: page_1
display_title: Page
position: 1
display_options:
display_extenders: { }
path: test_term_show_entity
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
tags: { }
<?php
namespace Drupal\Tests\taxonomy\Functional\Views;
/**
* Tests making taxonomy term base fields' displays configurable.
*
* @group taxonomy
*/
class TermDisplayConfigurableTest extends TaxonomyTestBase {
/**
* Views used by this test.
*
* @var array
*/
public static $testViews = ['test_term_show_entity'];
/**
* Sets base fields to configurable display and check settings are respected.
*/
public function testDisplayConfigurable() {
$user = $this->drupalCreateUser(['administer nodes']);
$this->drupalLogin($user);