Commit 0391038b authored by catch's avatar catch

Issue #2224395 by swentel, dixon_, Berdir, fago: Move entity UI code to...

Issue #2224395 by swentel, dixon_, Berdir, fago: Move entity UI code to field_ui module and remove entity.module.
parent f022decb
......@@ -24,7 +24,7 @@ class BlockContentCreationTest extends BlockContentTestBase {
*
* @var array
*/
public static $modules = array('block_content_test', 'dblog', 'entity');
public static $modules = array('block_content_test', 'dblog', 'field_ui');
/**
* Sets the test up.
......
name: Entity
type: module
description: 'Generic entity functionality.'
package: Core
version: VERSION
core: 8.x
entity.display_mode:
title: 'Display modes'
description: 'Configure what displays are available for your content and forms.'
route_name: entity.display_mode
parent: system.admin_structure
entity.entity_view_mode_list:
title: 'View modes'
description: 'Manage custom view modes.'
route_name: entity.entity_view_mode_list
parent: entity.display_mode
entity.entity_form_mode_list:
title: 'Form modes'
description: 'Manage custom form modes.'
route_name: entity.entity_form_mode_list
parent: entity.display_mode
entity.entity_view_mode.edit_form:
title: 'Edit'
route_name: entity.entity_view_mode.edit_form
base_route: entity.entity_view_mode.edit_form
entity.entity_form_mode.edit_form:
title: 'Edit'
route_name: entity.entity_form_mode.edit_form
base_route: entity.entity_form_mode.edit_form
entity.entity_view_mode_list:
title: List
route_name: entity.entity_view_mode_list
base_route: entity.entity_view_mode_list
entity.entity_form_mode_list:
title: List
route_name: entity.entity_form_mode_list
base_route: entity.entity_form_mode_list
<?php
/**
* @file
* Manage the entity system.
*
* The module is mostly an anchor point for configuration items owned by the
* entity system.
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
function entity_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.entity':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('The Entity module manages various types of content and configuration for the website. This information is collectively know as "entities", which are grouped into "entity types" (such as the main site content, comments, custom blocks, taxonomy terms, user accounts, and views configuration). Some entity types are further grouped into sub-types (for example, you could have article and page content types within the main site content entity type, and tag and category vocabularies within the taxonomy term entity type); other entity types, such as user accounts, do not have sub-types.') . '</p>';
$output .= '<p>' . t('Content entity types store most of their text, file, and other information in fields. See the <a href="!field">Field module help</a> and the <a href="!field_ui">Field UI help</a> pages for general information on fields and how to create and manage them.', array('!field' => \Drupal::url('help.page', array('name' => 'field')), '!field_ui' => \Drupal::url('help.page', array('name' => 'field_ui')))) . '</p>';
$output .= '<p>' . t('Configuration entity types are used to store configuration information for your site, such as individual views in the Views module, and settings for your main site content types. Configuration stored in this way can be exported, imported, and managed using the Configuration Manager module. See the <a href="!config-help">Configuration Manager module help</a> page for more information.', array('!config-help' => \Drupal::url('help.page', array('name' => 'config')))) . '</p>';
$output .= '<p>' . t('For more information, see the <a href="!entity_documentation">online documentation for the Entity module</a>.', array('!entity_documentation' => 'https://drupal.org/documentation/modules/entity')) . '</p>';
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<dl>';
$output .= '<dt>' . t('Managing view modes') . '</dt>';
$output .= '<dd>' . t('Each content entity can have various "modes" for viewing. For instance, a content item could be viewed in full content mode on its own page, teaser mode in a list, or RSS mode in a feed. You can create, edit the names of, and delete view modes on the <a href="!view-modes">View modes page</a>. Once a view mode has been set up, you can choose and format fields for the view mode within each entity sub-type on the Manage display page. See the <a href="!field_ui">Field UI module help page</a> for more information.', array('!view-modes' => \Drupal::url('entity.entity_view_mode_list'), '!field_ui' => \Drupal::url('help.page', array('name' => 'field_ui')))) . '</dd>';
$output .= '<dt>' . t('Managing form modes') . '</dt>';
$output .= '<dd>' . t('Each content entity can have various editing forms appropriate for different situations, which are known as "form modes". For instance, you might want to define a quick editing mode that allows users to edit the most important fields, and a full editing mode that gives access to all the fields. You can create, edit the names of, and delete form modes on the <a href="!form-modes">Manage custom form modes page</a>. Once a form mode has been set up, you can choose which fields are available on that form within each entity sub-type on the Manage form display page. See the <a href="!field_ui">Field UI module help page</a> for more information.', array('!form-modes' => \Drupal::url('entity.entity_form_mode_list'), '!field_ui' => \Drupal::url('help.page', array('name' => 'field_ui')))) . '</dd>';
$output .= '</dl>';
return $output;
}
}
/**
* Implements hook_permission().
*/
function entity_permission() {
return array(
'administer display modes' => array(
'title' => t('Add, edit, and delete custom display modes.'),
),
);
}
/**
* Implements hook_entity_type_alter().
*/
function entity_entity_type_alter(array &$entity_types) {
/** @var $entity_types \Drupal\Core\Entity\EntityTypeInterface[] */
$form_mode = $entity_types['entity_form_mode'];
$form_mode->setListBuilderClass('Drupal\entity\EntityFormModeListBuilder');
$form_mode->setFormClass('add', 'Drupal\entity\Form\EntityFormModeAddForm');
$form_mode->setFormClass('edit', 'Drupal\entity\Form\EntityDisplayModeEditForm');
$form_mode->setFormClass('delete', 'Drupal\entity\Form\EntityDisplayModeDeleteForm');
$form_mode->set('admin_permission', 'administer display modes');
$form_mode->setLinkTemplate('delete-form', 'entity.entity_form_mode.delete_form');
$form_mode->setLinkTemplate('edit-form', 'entity.entity_form_mode.edit_form');
$view_mode = $entity_types['entity_view_mode'];
$view_mode->setListBuilderClass('Drupal\entity\EntityDisplayModeListBuilder');
$view_mode->setFormClass('add', 'Drupal\entity\Form\EntityDisplayModeAddForm');
$view_mode->setFormClass('edit', 'Drupal\entity\Form\EntityDisplayModeEditForm');
$view_mode->setFormClass('delete', 'Drupal\entity\Form\EntityDisplayModeDeleteForm');
$view_mode->set('admin_permission', 'administer display modes');
$view_mode->setLinkTemplate('delete-form', 'entity.entity_view_mode.delete_form');
$view_mode->setLinkTemplate('edit-form', 'entity.entity_view_mode.edit_form');
}
entity.display_mode:
path: '/admin/structure/display-modes'
defaults:
_content: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
_title: 'Display modes'
requirements:
_permission: 'administer display modes'
entity.entity_view_mode_list:
path: '/admin/structure/display-modes/view'
defaults:
_entity_list: 'entity_view_mode'
_title: 'View modes'
requirements:
_permission: 'administer display modes'
entity.entity_view_mode_add:
path: '/admin/structure/display-modes/view/add'
defaults:
_content: '\Drupal\entity\Controller\EntityDisplayModeController::viewModeTypeSelection'
_title: 'Choose view mode entity type'
requirements:
_permission: 'administer display modes'
entity.entity_view_mode_add_type:
path: '/admin/structure/display-modes/view/add/{entity_type_id}'
defaults:
_entity_form: 'entity_view_mode.add'
_title: 'Add view mode'
requirements:
_permission: 'administer display modes'
entity.entity_view_mode.edit_form:
path: '/admin/structure/display-modes/view/manage/{entity_view_mode}'
defaults:
_entity_form: 'entity_view_mode.edit'
_title: 'Edit view mode'
requirements:
_entity_access: 'entity_view_mode.update'
entity.entity_view_mode.delete_form:
path: '/admin/structure/display-modes/view/manage/{entity_view_mode}/delete'
defaults:
_entity_form: 'entity_view_mode.delete'
_title: 'Delete view mode'
requirements:
_entity_access: 'entity_view_mode.delete'
entity.entity_form_mode_list:
path: '/admin/structure/display-modes/form'
defaults:
_entity_list: 'entity_form_mode'
_title: 'Form modes'
requirements:
_permission: 'administer display modes'
entity.entity_form_mode_add:
path: '/admin/structure/display-modes/form/add'
defaults:
_content: '\Drupal\entity\Controller\EntityDisplayModeController::formModeTypeSelection'
_title: 'Choose form mode entity type'
requirements:
_permission: 'administer display modes'
entity.entity_form_mode_add_type:
path: '/admin/structure/display-modes/form/add/{entity_type_id}'
defaults:
_entity_form: 'entity_form_mode.add'
_title: 'Add form mode'
requirements:
_permission: 'administer display modes'
entity.entity_form_mode.edit_form:
path: '/admin/structure/display-modes/form/manage/{entity_form_mode}'
defaults:
_entity_form: 'entity_form_mode.edit'
_title: 'Edit form mode'
requirements:
_entity_access: 'entity_form_mode.update'
entity.entity_form_mode.delete_form:
path: '/admin/structure/display-modes/form/manage/{entity_form_mode}/delete'
defaults:
_entity_form: 'entity_form_mode.delete'
_title: 'Delete form mode'
requirements:
_entity_access: 'entity_form_mode.delete'
entity.entity_view_mode_add:
route_name: entity.entity_view_mode_add
field_ui.entity_view_mode_add:
route_name: field_ui.entity_view_mode_add
title: 'Add new view mode'
weight: 1
appears_on:
- entity.entity_view_mode_list
- field_ui.entity_view_mode_list
entity.entity_form_mode_add:
route_name: entity.entity_form_mode_add
field_ui.entity_form_mode_add:
route_name: field_ui.entity_form_mode_add
title: 'Add new form mode'
weight: 1
appears_on:
- entity.entity_form_mode_list
- field_ui.entity_form_mode_list
......@@ -3,3 +3,21 @@ field_ui.list:
description: 'Overview of fields on all entity types.'
route_name: field_ui.list
parent: system.admin_reports
field_ui.display_mode:
title: 'Display modes'
description: 'Configure what displays are available for your content and forms.'
route_name: field_ui.display_mode
parent: system.admin_structure
field_ui.entity_view_mode_list:
title: 'View modes'
description: 'Manage custom view modes.'
route_name: field_ui.entity_view_mode_list
parent: field_ui.display_mode
field_ui.entity_form_mode_list:
title: 'Form modes'
description: 'Manage custom form modes.'
route_name: field_ui.entity_form_mode_list
parent: field_ui.display_mode
......@@ -2,6 +2,27 @@ field_ui.list:
title: Entities
route_name: field_ui.list
base_route: field_ui.list
field_ui.fields:
class: \Drupal\Core\Menu\LocalTaskDefault
deriver: \Drupal\field_ui\Plugin\Derivative\FieldUiLocalTask
field_ui.entity_view_mode.edit_form:
title: 'Edit'
route_name: field_ui.entity_view_mode.edit_form
base_route: field_ui.entity_view_mode.edit_form
field_ui.entity_form_mode.edit_form:
title: 'Edit'
route_name: field_ui.entity_form_mode.edit_form
base_route: field_ui.entity_form_mode.edit_form
field_ui.entity_view_mode_list:
title: List
route_name: field_ui.entity_view_mode_list
base_route: field_ui.entity_view_mode_list
field_ui.entity_form_mode_list:
title: List
route_name: field_ui.entity_form_mode_list
base_route: field_ui.entity_form_mode_list
......@@ -48,6 +48,10 @@ function field_ui_help($route_name, RouteMatchInterface $route_match) {
$output .= '<dt>' . t('Fields on comments') . '</dt>';
$output .= '<dd>' . t('Fields on comments are defined at the content-type level, on the <em>Comment fields</em> tab of the content type edit page (which you can reach from the <a href="@types">Content types page</a>). When you add a field for comments, each comment on a content item of that type will have that field added to it. For example, you could add a website field to the comments on forum posts, to allow forum commenters to add a link to their website.', array('@types' => url('admin/structure/types'))) . '</dd>';
$output .= '</dl>';
$output .= '<dt>' . t('Managing view modes') . '</dt>';
$output .= '<dd>' . t('Each content entity can have various "modes" for viewing. For instance, a content item could be viewed in full content mode on its own page, teaser mode in a list, or RSS mode in a feed. You can create, edit the names of, and delete view modes on the <a href="!view-modes">View modes page</a>. Once a view mode has been set up, you can choose and format fields for the view mode within each entity sub-type on the Manage display page. See the <a href="!field_ui">Field UI module help page</a> for more information.', array('!view-modes' => \Drupal::url('field_ui.entity_view_mode_list'), '!field_ui' => \Drupal::url('help.page', array('name' => 'field_ui')))) . '</dd>';
$output .= '<dt>' . t('Managing form modes') . '</dt>';
$output .= '<dd>' . t('Each content entity can have various editing forms appropriate for different situations, which are known as "form modes". For instance, you might want to define a quick editing mode that allows users to edit the most important fields, and a full editing mode that gives access to all the fields. You can create, edit the names of, and delete form modes on the <a href="!form-modes">Manage custom form modes page</a>. Once a form mode has been set up, you can choose which fields are available on that form within each entity sub-type on the Manage form display page. See the <a href="!field_ui">Field UI module help page</a> for more information.', array('!form-modes' => \Drupal::url('field_ui.entity_form_mode_list'), '!field_ui' => \Drupal::url('help.page', array('name' => 'field_ui')))) . '</dd>';
return $output;
case 'field_ui.list':
......@@ -78,6 +82,10 @@ function field_ui_permission() {
}
}
$permissions['administer display modes'] = array(
'title' => t('Add, edit, and delete custom display modes.'),
);
return $permissions;
}
......@@ -308,3 +316,27 @@ function field_ui_local_tasks_alter(&$local_tasks) {
$local_task = FieldUiLocalTask::create($container, 'field_ui.fields');
$local_task->alterLocalTasks($local_tasks);
}
/**
* Implements hook_entity_type_alter().
*/
function field_ui_entity_type_alter(array &$entity_types) {
/** @var $entity_types \Drupal\Core\Entity\EntityTypeInterface[] */
$form_mode = $entity_types['entity_form_mode'];
$form_mode->setListBuilderClass('Drupal\field_ui\EntityFormModeListBuilder');
$form_mode->setFormClass('add', 'Drupal\field_ui\Form\EntityFormModeAddForm');
$form_mode->setFormClass('edit', 'Drupal\field_ui\Form\EntityDisplayModeEditForm');
$form_mode->setFormClass('delete', 'Drupal\field_ui\Form\EntityDisplayModeDeleteForm');
$form_mode->set('admin_permission', 'administer display modes');
$form_mode->setLinkTemplate('delete-form', 'field_ui.entity_form_mode.delete_form');
$form_mode->setLinkTemplate('edit-form', 'field_ui.entity_form_mode.edit_form');
$view_mode = $entity_types['entity_view_mode'];
$view_mode->setListBuilderClass('Drupal\field_ui\EntityDisplayModeListBuilder');
$view_mode->setFormClass('add', 'Drupal\field_ui\Form\EntityDisplayModeAddForm');
$view_mode->setFormClass('edit', 'Drupal\field_ui\Form\EntityDisplayModeEditForm');
$view_mode->setFormClass('delete', 'Drupal\field_ui\Form\EntityDisplayModeDeleteForm');
$view_mode->set('admin_permission', 'administer display modes');
$view_mode->setLinkTemplate('delete-form', 'field_ui.entity_view_mode.delete_form');
$view_mode->setLinkTemplate('edit-form', 'field_ui.entity_view_mode.edit_form');
}
......@@ -5,3 +5,91 @@ field_ui.list:
_title: 'Field list'
requirements:
_permission: 'administer content types'
field_ui.display_mode:
path: '/admin/structure/display-modes'
defaults:
_content: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
_title: 'Display modes'
requirements:
_permission: 'administer display modes'
field_ui.entity_view_mode_list:
path: '/admin/structure/display-modes/view'
defaults:
_entity_list: 'entity_view_mode'
_title: 'View modes'
requirements:
_permission: 'administer display modes'
field_ui.entity_view_mode_add:
path: '/admin/structure/display-modes/view/add'
defaults:
_content: '\Drupal\field_ui\Controller\EntityDisplayModeController::viewModeTypeSelection'
_title: 'Choose view mode entity type'
requirements:
_permission: 'administer display modes'
field_ui.entity_view_mode_add_type:
path: '/admin/structure/display-modes/view/add/{entity_type_id}'
defaults:
_entity_form: 'entity_view_mode.add'
_title: 'Add view mode'
requirements:
_permission: 'administer display modes'
field_ui.entity_view_mode.edit_form:
path: '/admin/structure/display-modes/view/manage/{entity_view_mode}'
defaults:
_entity_form: 'entity_view_mode.edit'
_title: 'Edit view mode'
requirements:
_entity_access: 'entity_view_mode.update'
field_ui.entity_view_mode.delete_form:
path: '/admin/structure/display-modes/view/manage/{entity_view_mode}/delete'
defaults:
_entity_form: 'entity_view_mode.delete'
_title: 'Delete view mode'
requirements:
_entity_access: 'entity_view_mode.delete'
field_ui.entity_form_mode_list:
path: '/admin/structure/display-modes/form'
defaults:
_entity_list: 'entity_form_mode'
_title: 'Form modes'
requirements:
_permission: 'administer display modes'
field_ui.entity_form_mode_add:
path: '/admin/structure/display-modes/form/add'
defaults:
_content: '\Drupal\field_ui\Controller\EntityDisplayModeController::formModeTypeSelection'
_title: 'Choose form mode entity type'
requirements:
_permission: 'administer display modes'
field_ui.entity_form_mode_add_type:
path: '/admin/structure/display-modes/form/add/{entity_type_id}'
defaults:
_entity_form: 'entity_form_mode.add'
_title: 'Add form mode'
requirements:
_permission: 'administer display modes'
field_ui.entity_form_mode.edit_form:
path: '/admin/structure/display-modes/form/manage/{entity_form_mode}'
defaults:
_entity_form: 'entity_form_mode.edit'
_title: 'Edit form mode'
requirements:
_entity_access: 'entity_form_mode.update'
field_ui.entity_form_mode.delete_form:
path: '/admin/structure/display-modes/form/manage/{entity_form_mode}/delete'
defaults:
_entity_form: 'entity_form_mode.delete'
_title: 'Delete form mode'
requirements:
_entity_access: 'entity_form_mode.delete'
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\entity\Controller\EntityDisplayModeController.
* Contains \Drupal\field_ui\Controller\EntityDisplayModeController.
*/
namespace Drupal\entity\Controller;
namespace Drupal\field_ui\Controller;
use Drupal\Core\Controller\ControllerBase;
use Drupal\Core\Url;
......@@ -27,7 +27,7 @@ public function viewModeTypeSelection() {
if ($entity_type->isFieldable() && $entity_type->hasViewBuilderClass()) {
$entity_types[$entity_type_id] = array(
'title' => $entity_type->getLabel(),
'url' => new Url('entity.entity_view_mode_add_type', array('entity_type_id' => $entity_type_id)),
'url' => new Url('field_ui.entity_view_mode_add_type', array('entity_type_id' => $entity_type_id)),
'localized_options' => array(),
);
}
......@@ -50,7 +50,7 @@ public function formModeTypeSelection() {
if ($entity_type->isFieldable() && $entity_type->hasFormClasses()) {
$entity_types[$entity_type_id] = array(
'title' => $entity_type->getLabel(),
'url' => new Url('entity.entity_form_mode_add_type', array('entity_type_id' => $entity_type_id)),
'url' => new Url('field_ui.entity_form_mode_add_type', array('entity_type_id' => $entity_type_id)),
'localized_options' => array(),
);
}
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\entity\EntityDisplayModeListBuilder.
* Contains \Drupal\field_ui\EntityDisplayModeListBuilder.
*/
namespace Drupal\entity;
namespace Drupal\field_ui;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\entity\EntityFormModeListBuilder.
* Contains \Drupal\field_ui\EntityFormModeListBuilder.
*/
namespace Drupal\entity;
namespace Drupal\field_ui;
/**
* Defines a class to build a listing of form mode entities.
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\entity\Form\EntityDisplayModeAddForm.
* Contains \Drupal\field_ui\Form\EntityDisplayModeAddForm.
*/
namespace Drupal\entity\Form;
namespace Drupal\field_ui\Form;
use Drupal\Core\Form\FormStateInterface;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\entity\Form\EntityDisplayModeDeleteForm.
* Contains \Drupal\field_ui\Form\EntityDisplayModeDeleteForm.
*/
namespace Drupal\entity\Form;
namespace Drupal\field_ui\Form;
use Drupal\Core\Entity\EntityConfirmFormBase;
use Drupal\Core\Form\FormStateInterface;
......@@ -20,7 +20,7 @@ class EntityDisplayModeDeleteForm extends EntityConfirmFormBase {
* {@inheritdoc}
*/
public function getCancelUrl() {
return new Url('entity.' . $this->entity->getEntityTypeId() . '_list');
return new Url('field_ui.' . $this->entity->getEntityTypeId() . '_list');
}
/**
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\entity\Form\EntityDisplayModeEditForm.
* Contains \Drupal\field_ui\Form\EntityDisplayModeEditForm.
*/
namespace Drupal\entity\Form;
namespace Drupal\field_ui\Form;
/**
* Provides the edit form for entity display modes.
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\entity\Form\EntityDisplayModeFormBase.
* Contains \Drupal\field_ui\Form\EntityDisplayModeFormBase.
*/
namespace Drupal\entity\Form;
namespace Drupal\field_ui\Form;
use Drupal\Core\Entity\EntityForm;
use Drupal\Core\Entity\EntityManagerInterface;
......@@ -125,7 +125,7 @@ public function save(array $form, FormStateInterface $form_state) {
drupal_set_message(t('Saved the %label @entity-type.', array('%label' => $this->entity->label(), '@entity-type' => $this->entityType->getLowercaseLabel())));
$this->entity->save();
\Drupal::entityManager()->clearCachedFieldDefinitions();
$form_state->setRedirect('entity.' . $this->entity->getEntityTypeId() . '_list');
$form_state->setRedirect('field_ui.' . $this->entity->getEntityTypeId() . '_list');
}
}
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\entity\Form\EntityFormModeAddForm.
* Contains \Drupal\field_ui\Form\EntityFormModeAddForm.
*/
namespace Drupal\entity\Form;
namespace Drupal\field_ui\Form;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
......
......@@ -2,17 +2,17 @@
/**
* @file
* Contains \Drupal\entity\Tests\EntityDisplayModeTest.
* Contains \Drupal\field_ui\Tests\EntityDisplayModeTest.
*/
namespace Drupal\entity\Tests;
namespace Drupal\field_ui\Tests;
use Drupal\simpletest\WebTestBase;
/**
* Tests the entity display modes UI.
*
* @group entity
* @group field_ui
*/
class EntityDisplayModeTest extends WebTestBase {
......@@ -21,7 +21,7 @@ class EntityDisplayModeTest extends WebTestBase {
*
* @var array
*/
public static $modules = array('entity_test', 'entity');
public static $modules = array('entity_test', 'field_ui');
/**
* Tests the EntityViewMode user interface.
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\entity\Tests\EntityDisplayTest.
* Contains \Drupal\field_ui\Tests\EntityDisplayTest.
*/
namespace Drupal\entity\Tests;
namespace Drupal\field_ui\Tests;
use Drupal\Core\Entity\Entity\EntityViewMode;
use Drupal\simpletest\KernelTestBase;
......@@ -13,11 +13,11 @@
/**
* Tests the entity display configuration entities.
*
* @group entity
* @group field_ui
*/
class EntityDisplayTest extends KernelTestBase {
public static $modules = array('entity', 'field', 'entity_test', 'user', 'text', 'field_test', 'node', 'system');
public static $modules = array('field_ui', 'field', 'entity_test', 'user', 'text', 'field_test', 'node', 'system');
protected function setUp() {
parent::setUp();
......
......@@ -2,22 +2,22 @@
/**
* @file
* Contains \Drupal\entity\Tests\EntityFormDisplayTest.
* Contains \Drupal\field_ui\Tests\EntityFormDisplayTest.
*/
namespace Drupal\entity\Tests;
namespace Drupal\field_ui\Tests;
use Drupal\Core\Entity\Entity\EntityFormMode;
use Drupal\simpletest\DrupalUnitTestBase;
use Drupal\simpletest\KernelTestBase;
/**
* Tests the entity display configuration entities.
*
* @group entity
* @group field_ui
*/
class EntityFormDisplayTest extends DrupalUnitTestBase {
class EntityFormDisplayTest extends KernelTestBase {
public static $modules = array('entity', 'field', 'entity_test', 'field_test', 'user', 'text');
public static $modules = array('field_ui', 'field', 'entity_test', 'field_test', 'user', 'text');
protected function setUp() {
parent::setUp();
......
......@@ -21,7 +21,7 @@ class KernelTestBaseTest extends KernelTestBase {
*
* @var array
*/
public static $modules = array('entity', 'entity_t