Commit 655f5a03 authored by alexpott's avatar alexpott

Issue #2165835 by yched, tstoeckler: Rename EntityDisplay to EntityViewDisplay...

Issue #2165835 by yched, tstoeckler: Rename EntityDisplay to EntityViewDisplay in accordance with its interface.
parent 784f08f5
......@@ -510,18 +510,18 @@ function entity_view_multiple(array $entities, $view_mode, $langcode = NULL, $re
}
/**
* Returns the entity_display object associated to a bundle and view mode.
* Returns the entity view display associated to a bundle and view mode.
*
* Use this function when assigning suggested display options for a component
* in a given view mode. Note that they will only be actually used at render
* time if the view mode itself is configured to use dedicated display settings
* for the bundle; if not, the 'default' display is used instead.
*
* The function reads the entity_display object from the current configuration,
* or returns a ready-to-use empty one if configuration entry exists yet for
* this bundle and view mode. This streamlines manipulation of display objects
* by always returning a consistent object that reflects the current state of
* the configuration.
* The function reads the entity view display from the current configuration, or
* returns a ready-to-use empty one if configuration entry exists yet for this
* bundle and view mode. This streamlines manipulation of display objects by
* always returning a consistent object that reflects the current state of the
* configuration.
*
* Example usage:
* - Set the 'body' field to be displayed and the 'field_image' field to be
......@@ -546,19 +546,19 @@ function entity_view_multiple(array $entities, $view_mode, $langcode = NULL, $re
* this bundle.
*
* @return \Drupal\Core\Entity\Display\EntityViewDisplayInterface
* The display object associated to the view mode.
* The entity view display associated to the view mode.
*/
function entity_get_display($entity_type, $bundle, $view_mode) {
// Try loading the display from configuration.
$display = entity_load('entity_display', $entity_type . '.' . $bundle . '.' . $view_mode);
$display = entity_load('entity_view_display', $entity_type . '.' . $bundle . '.' . $view_mode);
// If not found, create a fresh display object. We do not preemptively create
// new entity_display configuration entries for each existing entity type and
// bundle whenever a new view mode becomes available. Instead, configuration
// entries are only created when a display object is explicitly configured
// and saved.
// new entity_view_display configuration entries for each existing entity type
// and bundle whenever a new view mode becomes available. Instead,
// configuration entries are only created when a display object is explicitly
// configured and saved.
if (!$display) {
$display = entity_create('entity_display', array(
$display = entity_create('entity_view_display', array(
'targetEntityType' => $entity_type,
'bundle' => $bundle,
'mode' => $view_mode,
......@@ -570,7 +570,7 @@ function entity_get_display($entity_type, $bundle, $view_mode) {
}
/**
* Returns the entity_display object used to render an entity.
* Returns the entity view display used to render an entity.
*
* Depending on the configuration of the view mode for the bundle, this can be
* either the display object associated to the view mode, or the 'default'
......@@ -589,7 +589,7 @@ function entity_get_display($entity_type, $bundle, $view_mode) {
* The view mode being rendered.
*
* @return \Drupal\Core\Entity\Display\EntityViewDisplayInterface
* The display object that should be used to render the entity.
* The entity view display that should be used to render the entity.
*
* @see entity_get_display().
*/
......@@ -605,7 +605,7 @@ function entity_get_render_display(EntityInterface $entity, $view_mode) {
'default' => $entity_type . '.' . $bundle . '.default',
$view_mode => $entity_type . '.' . $bundle . '.' . $view_mode,
);
$entity_displays = entity_load_multiple('entity_display', $ids);
$entity_displays = entity_load_multiple('entity_view_display', $ids);
if (isset($entity_displays[$ids[$view_mode]]) && $entity_displays[$ids[$view_mode]]->status()) {
$render_view_mode = $view_mode;
}
......@@ -620,19 +620,19 @@ function entity_get_render_display(EntityInterface $entity, $view_mode) {
'bundle' => $bundle,
'view_mode' => $view_mode,
);
drupal_alter('entity_display', $display, $display_context);
drupal_alter('entity_view_display', $display, $display_context);
return $display;
}
/**
* Returns the entity_form_display object associated to a bundle and form mode.
* Returns the entity form display associated to a bundle and form mode.
*
* The function reads the entity_form_display object from the current
* configuration, or returns a ready-to-use empty one if configuration entry
* The function reads the entity form display object from the current
* configuration, or returns a ready-to-use empty one if no configuration entry
* exists yet for this bundle and form mode. This streamlines manipulation of
* EntityFormDisplay objects by always returning a consistent object that
* reflects the current state of the configuration.
* entity form displays by always returning a consistent object that reflects
* the current state of the configuration.
*
* Example usage:
* - Set the 'body' field to be displayed with the 'text_textarea_with_summary'
......@@ -658,16 +658,16 @@ function entity_get_render_display(EntityInterface $entity, $view_mode) {
* The form mode.
*
* @return \Drupal\Core\Entity\Display\EntityFormDisplayInterface
* The EntityFormDisplay object associated to the form mode.
* The entity form display associated to the given form mode.
*/
function entity_get_form_display($entity_type, $bundle, $form_mode) {
// Try loading the entity from configuration.
$entity_form_display = entity_load('entity_form_display', $entity_type . '.' . $bundle . '.' . $form_mode);
// If not found, create a fresh entity object. We do not preemptively create
// new EntityFormDisplay configuration entries for each existing entity type
// new entity form display configuration entries for each existing entity type
// and bundle whenever a new form mode becomes available. Instead,
// configuration entries are only created when a EntityFormDisplay object is
// configuration entries are only created when an entity form display is
// explicitly configured and saved.
if (!$entity_form_display) {
$entity_form_display = entity_create('entity_form_display', array(
......@@ -682,7 +682,7 @@ function entity_get_form_display($entity_type, $bundle, $form_mode) {
}
/**
* Returns the entity_form_display object used to render an entity form.
* Returns the entity form display used to render an entity form.
*
* This function should only be used internally when rendering an entity form.
* When assigning suggested form display options for a component in a given form
......@@ -697,7 +697,8 @@ function entity_get_form_display($entity_type, $bundle, $form_mode) {
* The form mode being rendered.
*
* @return \Drupal\Core\Entity\Display\EntityFormDisplayInterface
* The form display object that should be used to render the entity form.
* The entity form display object that should be used to render the entity
* form.
*
* @see entity_get_form_display().
*/
......
......@@ -13,7 +13,7 @@
interface EntityDisplayInterface {
/**
* Creates a duplicate of the EntityDisplay object on a different view mode.
* Creates a duplicate of the entity display object on a different view mode.
*
* The new object necessarily has the same $targetEntityType and $bundle
* properties than the original one.
......@@ -55,7 +55,7 @@ public function getComponent($name);
* The display options.
*
* @return self
* The EntityDisplay object.
* The entity display object.
*/
public function setComponent($name, array $options = array());
......@@ -66,7 +66,7 @@ public function setComponent($name, array $options = array());
* The name of the component.
*
* @return self
* The EntityDisplay object.
* The entity display object.
*/
public function removeComponent($name);
......
......@@ -165,8 +165,8 @@ protected function getBuildDefaults(EntityInterface $entity, $view_mode, $langco
* @param \Drupal\Core\Entity\EntityInterface $entity
* The entity to be prepared.
* @param \Drupal\Core\Entity\Display\EntityViewDisplayInterface $display
* The entity_display object holding the display options configured for
* the entity components.
* The entity view display holding the display options configured for the
* entity components.
* @param string $view_mode
* The view mode that should be used to prepare the entity.
* @param string $langcode
......
......@@ -17,8 +17,8 @@ interface EntityViewBuilderInterface {
*
* @param array $entities
* The entities, implementing EntityInterface, whose content is being built.
* @param array $displays
* The array of entity_display objects holding the display options
* @param \Drupal\Core\Entity\EntityViewDisplayInterface[] $displays
* The array of entity view displays holding the display options
* configured for the entity components, keyed by bundle name.
* @param string $view_mode
* The view mode in which the entity is being viewed.
......
......@@ -143,7 +143,7 @@ public function isConfigurable();
* @return bool
* TRUE if the display for this field is configurable in the given context.
* If TRUE, the display options returned by getDisplayOptions() may be
* overridden via the respective EntityDisplay.
* overridden via the respective entity display.
*
* @see \Drupal\Core\Entity\Display\EntityDisplayInterface
*/
......@@ -153,7 +153,7 @@ public function isDisplayConfigurable($display_context);
* Returns the default display options for the field.
*
* If the field's display is configurable, the returned display options act
* as default values and may be overridden via the respective EntityDisplay.
* as default values and may be overridden via the respective entity display.
* Otherwise, the display options will be applied to entity displays as is.
*
* @param string $display_context
......
......@@ -87,7 +87,7 @@ function hook_comment_load(Drupal\comment\Comment $comments) {
* @param \Drupal\comment\Entity\Comment $comment $comment
* Passes in the comment the action is being performed on.
* @param \Drupal\Core\Entity\Display\EntityViewDisplayInterface $display
* The entity_display object holding the display options configured for the
* The entity view display holding the display options configured for the
* comment components.
* @param $view_mode
* View mode, e.g. 'full', 'teaser'...
......@@ -125,7 +125,7 @@ function hook_comment_view(\Drupal\comment\Entity\Comment $comment, \Drupal\Core
* @param \Drupal\comment\Entity\Comment $comment
* The comment being rendered.
* @param \Drupal\Core\Entity\Display\EntityViewDisplayInterface $display
* The entity_display object holding the display options configured for the
* The entity view display holding the display options configured for the
* comment components.
*
* @see comment_view()
......
# Schema for the configuration files of the Comment module.
entity_display.field.comment_default:
type: entity_field_display_base
entity_view_display.field.comment_default:
type: entity_field_view_display_base
label: 'Comment display format settings'
mapping:
settings:
......
......@@ -24,8 +24,8 @@ field.datetime.value:
- type: string
label: 'Value'
entity_display.field.datetime_default:
type: entity_field_display_base
entity_view_display.field.datetime_default:
type: entity_field_view_display_base
label: 'Datetime default display format settings'
mapping:
settings:
......@@ -36,8 +36,8 @@ entity_display.field.datetime_default:
type: string
label: 'Date format'
entity_display.field.datetime_plain:
type: entity_field_display_base
entity_view_display.field.datetime_plain:
type: entity_field_view_display_base
label: 'Datetime plain display format settings'
mapping:
settings:
......
# Schema for entity fields, specifying generic component data type information.
# Schema for the base of the view mode display format settings.
entity_field_display_base:
entity_field_view_display_base:
type: mapping
mapping:
label:
......
......@@ -53,7 +53,7 @@ entity.form_mode.*.*:
label: 'Default language'
# Overview configuration information for view mode or form mode displays.
entity.display.*.*.*:
entity.view_display.*.*.*:
type: mapping
label: 'Entity display'
mapping:
......@@ -79,7 +79,7 @@ entity.display.*.*.*:
type: sequence
label: 'Field display formatters'
sequence:
- type: entity_display.field.[type]
- type: entity_view_display.field.[type]
hidden:
type: sequence
label: 'Field display setting'
......@@ -117,7 +117,7 @@ entity.form_display.*.*.*:
label: 'Enabled'
# Default schema for entity display field with undefined type.
entity_display.field.*:
entity_view_display.field.*:
type: mapping
label: 'Entity display default'
mapping:
......
......@@ -130,12 +130,12 @@ function entity_menu_link_defaults() {
*/
function entity_entity_bundle_rename($entity_type, $bundle_old, $bundle_new) {
// Rename entity displays.
$entity_info = \Drupal::entityManager()->getDefinition('entity_display');
$entity_info = \Drupal::entityManager()->getDefinition('entity_view_display');
if ($bundle_old !== $bundle_new) {
$ids = config_get_storage_names_with_prefix('entity.display.' . $entity_type . '.' . $bundle_old . '.');
$ids = config_get_storage_names_with_prefix('entity.view_display.' . $entity_type . '.' . $bundle_old . '.');
foreach ($ids as $id) {
$id = ConfigStorageController::getIDFromConfigName($id, $entity_info->getConfigPrefix());
$display = entity_load('entity_display', $id);
$display = entity_load('entity_view_display', $id);
$new_id = $entity_type . '.' . $bundle_new . '.' . $display->mode;
$display->id = $new_id;
$display->bundle = $bundle_new;
......@@ -163,12 +163,12 @@ function entity_entity_bundle_rename($entity_type, $bundle_old, $bundle_new) {
*/
function entity_entity_bundle_delete($entity_type, $bundle) {
// Remove entity displays of the deleted bundle.
$entity_info = \Drupal::entityManager()->getDefinition('entity_display');
$ids = config_get_storage_names_with_prefix('entity.display.' . $entity_type . '.' . $bundle . '.');
$entity_info = \Drupal::entityManager()->getDefinition('entity_view_display');
$ids = config_get_storage_names_with_prefix('entity.view_display.' . $entity_type . '.' . $bundle . '.');
foreach ($ids as &$id) {
$id = ConfigStorageController::getIDFromConfigName($id, $entity_info->getConfigPrefix());
}
entity_delete_multiple('entity_display', $ids);
entity_delete_multiple('entity_view_display', $ids);
// Remove entity form displays of the deleted bundle.
$entity_info = \Drupal::entityManager()->getDefinition('entity_form_display');
......
......@@ -2,7 +2,7 @@
/**
* @file
* Contains \Drupal\entity\Entity\EntityDisplay.
* Contains \Drupal\entity\Entity\EntityViewDisplay.
*/
namespace Drupal\entity\Entity;
......@@ -15,12 +15,12 @@
* rendered entity in a given view mode.
*
* @EntityType(
* id = "entity_display",
* label = @Translation("Entity display"),
* id = "entity_view_display",
* label = @Translation("Entity view display"),
* controllers = {
* "storage" = "Drupal\Core\Config\Entity\ConfigStorageController"
* },
* config_prefix = "entity.display",
* config_prefix = "entity.view_display",
* entity_keys = {
* "id" = "id",
* "uuid" = "uuid",
......@@ -28,7 +28,7 @@
* }
* )
*/
class EntityDisplay extends EntityDisplayBase implements EntityViewDisplayInterface {
class EntityViewDisplay extends EntityDisplayBase implements EntityViewDisplayInterface {
/**
* {@inheritdoc}
......
......@@ -14,8 +14,7 @@
use Drupal\Core\Entity\Display\EntityDisplayInterface;
/**
* Base class for config entity types that store configuration for entity forms
* and displays.
* Provides a common base class for entity view and form displays.
*/
abstract class EntityDisplayBase extends ConfigEntityBase implements EntityDisplayInterface {
......@@ -121,7 +120,7 @@ public function __construct(array $values, $entity_type) {
// Add the validity checks back when http://drupal.org/node/1856556 is
// fixed.
// if (!isset($values['targetEntityType']) || !isset($values['bundle']) || !isset($values['mode'])) {
// throw new \InvalidArgumentException('Missing required properties for an EntityDisplay entity.');
// throw new \InvalidArgumentException('Missing required properties for an EntityDisplayBase entity.');
// }
// A plugin manager and a context type needs to be set by extending classes.
......
......@@ -10,7 +10,7 @@
use Drupal\simpletest\DrupalUnitTestBase;
/**
* Tests the EntityDisplay configuration entities.
* Tests the entity display configuration entities.
*/
class EntityDisplayTest extends DrupalUnitTestBase {
......@@ -30,10 +30,10 @@ protected function setUp() {
}
/**
* Tests basic CRUD operations on EntityDisplay objects.
* Tests basic CRUD operations on entity display objects.
*/
public function testEntityDisplayCRUD() {
$display = entity_create('entity_display', array(
$display = entity_create('entity_view_display', array(
'targetEntityType' => 'entity_test',
'bundle' => 'entity_test',
'mode' => 'default',
......@@ -57,7 +57,7 @@ public function testEntityDisplayCRUD() {
// Check that the display can be properly saved and read back.
$display->save();
$display = entity_load('entity_display', $display->id());
$display = entity_load('entity_view_display', $display->id());
foreach (array('component_1', 'component_2', 'component_3') as $name) {
$this->assertEqual($display->getComponent($name), $expected[$name]);
}
......@@ -71,14 +71,14 @@ public function testEntityDisplayCRUD() {
// Check that the removal is correctly persisted.
$display->save();
$display = entity_load('entity_display', $display->id());
$display = entity_load('entity_view_display', $display->id());
$this->assertNULL($display->getComponent('component_3'));
// Check that CreateCopy() creates a new component that can be correclty
// saved.
$new_display = $display->createCopy('other_view_mode');
$new_display->save();
$new_display = entity_load('entity_display', $new_display->id());
$new_display = entity_load('entity_view_display', $new_display->id());
$this->assertEqual($new_display->targetEntityType, $display->targetEntityType);
$this->assertEqual($new_display->bundle, $display->bundle);
$this->assertEqual($new_display->mode, 'other_view_mode');
......@@ -106,11 +106,11 @@ public function testEntityGetDisplay() {
}
/**
* Tests the behavior of a field component within an EntityDisplay object.
* Tests the behavior of a field component within an entity display object.
*/
public function testExtraFieldComponent() {
entity_test_create_bundle('bundle_with_extra_fields');
$display = entity_create('entity_display', array(
$display = entity_create('entity_view_display', array(
'targetEntityType' => 'entity_test',
'bundle' => 'bundle_with_extra_fields',
'mode' => 'default',
......@@ -129,7 +129,7 @@ public function testExtraFieldComponent() {
}
/**
* Tests the behavior of a field component within an EntityDisplay object.
* Tests the behavior of a field component within an entity display object.
*/
public function testFieldComponent() {
$this->enableModules(array('field_test'));
......@@ -149,7 +149,7 @@ public function testFieldComponent() {
));
$instance->save();
$display = entity_create('entity_display', array(
$display = entity_create('entity_view_display', array(
'targetEntityType' => 'entity_test',
'bundle' => 'entity_test',
'mode' => 'default',
......@@ -204,7 +204,7 @@ public function testFieldComponent() {
* Tests the behavior of a field component for a base field.
*/
public function testBaseFieldComponent() {
$display = entity_create('entity_display', array(
$display = entity_create('entity_view_display', array(
'targetEntityType' => 'entity_test_base_field_display',
'bundle' => 'entity_test_base_field_display',
'mode' => 'default',
......@@ -234,7 +234,7 @@ public function testBaseFieldComponent() {
// Check that saving the display only writes data for fields whose display
// is configurable.
$display->save();
$config = \Drupal::config('entity.display.' . $display->id());
$config = \Drupal::config('entity.view_display.' . $display->id());
$data = $config->get();
$this->assertFalse(isset($data['content']['test_no_display']));
$this->assertFalse(isset($data['hidden']['test_no_display']));
......@@ -243,7 +243,7 @@ public function testBaseFieldComponent() {
$this->assertFalse(isset($data['hidden']['test_display_non_configurable']));
// Check that defaults are correctly filled when loading the display.
$display = entity_load('entity_display', $display->id());
$display = entity_load('entity_view_display', $display->id());
foreach ($expected as $field_name => $options) {
$this->assertEqual($display->getComponent($field_name), $options);
}
......@@ -253,7 +253,7 @@ public function testBaseFieldComponent() {
$data['content']['test_display_non_configurable'] = $expected['test_display_non_configurable'];
$data['content']['test_display_non_configurable']['weight']++;
$config->setData($data)->save();
$display = entity_load('entity_display', $display->id());
$display = entity_load('entity_view_display', $display->id());
foreach ($expected as $field_name => $options) {
$this->assertEqual($display->getComponent($field_name), $options);
}
......@@ -276,11 +276,11 @@ public function testRenameDeleteBundle() {
$info->old_type = 'article';
$info->type = 'article_rename';
$info->save();
$old_display = entity_load('entity_display', 'node.article.default');
$old_display = entity_load('entity_view_display', 'node.article.default');
$this->assertFalse($old_display);
$old_form_display = entity_load('entity_form_display', 'node.article.default');
$this->assertFalse($old_form_display);
$new_display = entity_load('entity_display', 'node.article_rename.default');
$new_display = entity_load('entity_view_display', 'node.article_rename.default');
$this->assertEqual('article_rename', $new_display->bundle);
$this->assertEqual('node.article_rename.default', $new_display->id);
$new_form_display = entity_load('entity_form_display', 'node.article_rename.default');
......@@ -289,7 +289,7 @@ public function testRenameDeleteBundle() {
// Delete the bundle.
$info->delete();
$display = entity_load('entity_display', 'node.article_rename.default');
$display = entity_load('entity_view_display', 'node.article_rename.default');
$this->assertFalse($display);
$form_display = entity_load('entity_form_display', 'node.article_rename.default');
$this->assertFalse($form_display);
......@@ -317,12 +317,12 @@ public function testDeleteFieldInstance() {
$instance->save();
// Create default and teaser entity display.
entity_create('entity_display', array(
entity_create('entity_view_display', array(
'targetEntityType' => 'entity_test',
'bundle' => 'entity_test',
'mode' => 'default',
))->setComponent($field_name)->save();
entity_create('entity_display', array(
entity_create('entity_view_display', array(
'targetEntityType' => 'entity_test',
'bundle' => 'entity_test',
'mode' => 'teaser',
......
......@@ -10,7 +10,7 @@
use Drupal\simpletest\DrupalUnitTestBase;
/**
* Tests the EntityDisplay configuration entities.
* Tests the entity display configuration entities.
*/
class EntityFormDisplayTest extends DrupalUnitTestBase {
......
......@@ -67,8 +67,8 @@ entity_reference.default.handler_settings:
type: boolean
label: 'Create referenced entities if they don''t already exist'
entity_display.field.entity_reference_entity_view:
type: entity_field_display_base
entity_view_display.field.entity_reference_entity_view:
type: entity_field_view_display_base
label: 'Entity reference rendered entity display format settings'
mapping:
settings:
......@@ -82,8 +82,8 @@ entity_display.field.entity_reference_entity_view:
type: boolean
label: 'Show links'
entity_display.field.entity_reference_entity_id:
type: entity_field_display_base
entity_view_display.field.entity_reference_entity_id:
type: entity_field_view_display_base
label: 'Entity reference entity ID display format settings'
mapping:
settings:
......@@ -92,8 +92,8 @@ entity_display.field.entity_reference_entity_id:
sequence:
- type: string
entity_display.field.entity_reference_label:
type: entity_field_display_base
entity_view_display.field.entity_reference_label:
type: entity_field_view_display_base
label: 'Entity reference label display format settings'
mapping:
settings:
......
......@@ -431,7 +431,7 @@ public static function postDelete(EntityStorageControllerInterface $storage_cont
if (!$instance->deleted) {
$view_modes = array('default' => array()) + entity_get_view_modes($instance->entity_type);
foreach (array_keys($view_modes) as $mode) {
$displays_to_update['entity_display'][$instance->entity_type . '.' . $instance->bundle . '.' . $mode][] = $instance->field->name;
$displays_to_update['entity_view_display'][$instance->entity_type . '.' . $instance->bundle . '.' . $mode][] = $instance->field->name;
}
$form_modes = array('default' => array()) + entity_get_form_modes($instance->entity_type);
foreach (array_keys($form_modes) as $mode) {
......
......@@ -51,7 +51,7 @@ public function access(Route $route, Request $request, AccountInterface $account
if (!$view_mode || $view_mode == 'default') {
$visibility = TRUE;
}
elseif ($entity_display = $this->entityManager->getStorageController('entity_display')->load($entity_type . '.' . $bundle . '.' . $view_mode)) {
elseif ($entity_display = $this->entityManager->getStorageController('entity_view_display')->load($entity_type . '.' . $bundle . '.' . $view_mode)) {
$visibility = $entity_display->status();
}
......
......@@ -86,7 +86,7 @@ protected function buildFieldRow(FieldDefinitionInterface $field_definition, Ent
/**
* {@inheritdoc}
*/
protected function buildExtraFieldRow($field_id, $extra_field, $entity_display) {
protected function buildExtraFieldRow($field_id, $extra_field, EntityDisplayInterface $entity_display) {
$extra_field_row = parent::buildExtraFieldRow($field_id, $extra_field, $entity_display);
// Insert an empty placeholder for the label column.
......@@ -150,7 +150,7 @@ protected function getDisplayModes() {
* {@inheritdoc}
*/
protected function getDisplayType() {
return 'entity_display';
return 'entity_view_display';
}
/**
......
......@@ -430,7 +430,7 @@ protected function buildFieldRow(FieldDefinitionInterface $field_definition, Ent
* @return array
* A table row array.
*/
protected function buildExtraFieldRow($field_id, $extra_field, $entity_display) {
protected function buildExtraFieldRow($field_id, $extra_field, EntityDisplayInterface $entity_display) {
$display_options = $entity_display->getComponent($field_id);
$extra_field_row = array(
......
......@@ -60,8 +60,8 @@ field.file.instance_settings:
type: boolean
label: 'Enable Description field'
entity_display.field.file_default:
type: entity_field_display_base
entity_view_display.field.file_default:
type: entity_field_view_display_base
label: 'Generic file format settings'
mapping:
settings:
......@@ -70,8 +70,8 @@ entity_display.field.file_default:
sequence:
- type: string
entity_display.field.file_rss_enclosure:
type: entity_field_display_base
entity_view_display.field.file_rss_enclosure:
type: entity_field_view_display_base
label: 'RSS enclosure format settings'
mapping:
settings:
......@@ -80,8 +80,8 @@ entity_display.field.file_rss_enclosure:
sequence:
- type: string
entity_display.field.file_table:
type: entity_field_display_base
entity_view_display.field.file_table:
type: entity_field_view_display_base
label: 'Table of files format settings'
mapping:
settings:
......@@ -90,8 +90,8 @@ entity_display.field.file_table:
sequence:
- type: string
entity_display.field.file_url_plain:
type: entity_field_display_base
entity_view_display.field.file_url_plain:
type: entity_field_view_display_base
label: 'URL to file format settings'
mapping:
settings:
......
......@@ -163,8 +163,8 @@ field.image.instance_settings:
type: field_default_image
label: 'Default value'
entity_display.field.image:
type: entity_field_display_base
entity_view_display.field.image:
type: entity_field_view_display_base
label: 'Image field display format settings'
mapping:
settings:
......
......@@ -146,7 +146,7 @@ protected static function replaceImageStyle(ImageStyleInterface $style) {
if ($style->id() != $style->getOriginalId()) {
// Loop through all entity displays looking for formatters / widgets using
// the image style.
foreach (entity_load_multiple('entity_display') as $display) {
foreach (entity_load_multiple('entity_view_display') as $display) {
foreach ($display->getComponents() as $name => $options) {
if (isset($options['type']) && $options['type'] == 'image' && $options['settings']['image_style'] == $style->getOriginalId()) {
$options['settings']['image_style'] = $style->id();
......
# Schema for the configuration files of the Link module.
entity_display.field.link:
type: entity_field_display_base
entity_view_display.field.link:
type: entity_field_view_display_base
label: 'Link format settings'
mapping:
settings:
......@@ -24,8 +24,8 @@ entity_display.field.link:
type: string
label: 'Open link in new window'
entity_display.field.link_separate:
type: entity_field_display_base
entity_view_display.field.link_separate:
type: entity_field_view_display_base
label: 'Link format settings'
mapping:
settings:
......