diff --git a/core/includes/entity.inc b/core/includes/entity.inc index 91cbc1e..9eb6731 100644 --- a/core/includes/entity.inc +++ b/core/includes/entity.inc @@ -537,19 +537,19 @@ function entity_get_form(EntityInterface $entity, $operation = 'default', array } /** - * Returns an entity list controller for a given entity type. + * Returns an entity list for a given entity type. * * @param string $entity_type * The type of the entity. * - * @return \Drupal\Core\Entity\EntityListControllerInterface - * An entity list controller. + * @return \Drupal\Core\Entity\EntityListInterface + * An entity list. * * @deprecated Use \Drupal\Core\Entity\EntityManagerInterface::getFormController(). */ function entity_list_controller($entity_type) { return \Drupal::entityManager() - ->getListController($entity_type); + ->getList($entity_type); } /** diff --git a/core/includes/menu.inc b/core/includes/menu.inc index b83c323..27a98d2 100644 --- a/core/includes/menu.inc +++ b/core/includes/menu.inc @@ -35,7 +35,7 @@ * block.admin_display: * path: '/admin/structure/block' * defaults: - * _content: '\Drupal\block\Controller\BlockListController::listing' + * _content: '\Drupal\block\Controller\BlockList::listing' * requirements: * _permission: 'administer blocks' * @endcode diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityListController.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityList.php similarity index 82% rename from core/lib/Drupal/Core/Config/Entity/ConfigEntityListController.php rename to core/lib/Drupal/Core/Config/Entity/ConfigEntityList.php index b363cc4..761a039 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityListController.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityList.php @@ -2,21 +2,21 @@ /** * @file - * Definition of Drupal\Core\Config\Entity\ConfigEntityListController. + * Contains \Drupal\Core\Config\Entity\ConfigEntityList. */ namespace Drupal\Core\Config\Entity; use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Entity\EntityListController; +use Drupal\Core\Entity\EntityList; /** - * Defines the default list controller for ConfigEntity objects. + * Defines the default list of configuration entities. */ -class ConfigEntityListController extends EntityListController { +class ConfigEntityList extends EntityList { /** - * Overrides Drupal\Core\Entity\EntityListController::load(). + * {@inheritdoc} */ public function load() { $entities = parent::load(); diff --git a/core/lib/Drupal/Core/Config/Entity/DraggableListController.php b/core/lib/Drupal/Core/Config/Entity/DraggableListBase.php similarity index 94% rename from core/lib/Drupal/Core/Config/Entity/DraggableListController.php rename to core/lib/Drupal/Core/Config/Entity/DraggableListBase.php index 5370be5..d198484 100644 --- a/core/lib/Drupal/Core/Config/Entity/DraggableListController.php +++ b/core/lib/Drupal/Core/Config/Entity/DraggableListBase.php @@ -2,7 +2,7 @@ /** * @file - * Contains Drupal\Core\Config\Entity\DraggableListController. + * Contains \Drupal\Core\Config\Entity\DraggableListBase. */ namespace Drupal\Core\Config\Entity; @@ -13,9 +13,9 @@ use Drupal\Core\Form\FormInterface; /** - * Provides a list controller for draggable configuration entities. + * Provides a list of draggable configuration entities. */ -abstract class DraggableListController extends ConfigEntityListController implements FormInterface { +abstract class DraggableListBase extends ConfigEntityList implements FormInterface { /** * The key to use for the form element containing the entities. diff --git a/core/lib/Drupal/Core/Entity/Annotation/EntityType.php b/core/lib/Drupal/Core/Entity/Annotation/EntityType.php index 3dbbb39..844e464 100644 --- a/core/lib/Drupal/Core/Entity/Annotation/EntityType.php +++ b/core/lib/Drupal/Core/Entity/Annotation/EntityType.php @@ -48,7 +48,7 @@ class EntityType extends Plugin { * similar. The classes must implement * \Drupal\Core\Entity\EntityFormControllerInterface * - list: The name of the class that provides listings of the entities. The - * class must implement \Drupal\Core\Entity\EntityListControllerInterface. + * class must implement \Drupal\Core\Entity\EntityListInterface. * - render: The name of the class that is used to render the entities. The * class must implement \Drupal\Core\Entity\EntityViewBuilderInterface. * - access: The name of the class that is used for access checks. The class diff --git a/core/lib/Drupal/Core/Entity/Controller/EntityListController.php b/core/lib/Drupal/Core/Entity/Controller/EntityListController.php index 7a07a38..bcfa972 100644 --- a/core/lib/Drupal/Core/Entity/Controller/EntityListController.php +++ b/core/lib/Drupal/Core/Entity/Controller/EntityListController.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\Core\Entity\Controller\EntityListController. + * Contains \Drupal\Core\Entity\Controller\EntityList. */ namespace Drupal\Core\Entity\Controller; @@ -25,7 +25,7 @@ class EntityListController extends ControllerBase { * A render array as expected by drupal_render(). */ public function listing($entity_type) { - return $this->entityManager()->getListController($entity_type)->render(); + return $this->entityManager()->getList($entity_type)->render(); } } diff --git a/core/lib/Drupal/Core/Entity/Controller/EntityViewController.php b/core/lib/Drupal/Core/Entity/Controller/EntityViewController.php index d11e4a6..5a9a28a 100644 --- a/core/lib/Drupal/Core/Entity/Controller/EntityViewController.php +++ b/core/lib/Drupal/Core/Entity/Controller/EntityViewController.php @@ -25,7 +25,7 @@ class EntityViewController implements ContainerInjectionInterface { protected $entityManager; /** - * Creates an EntityListController object. + * Creates an EntityList object. * * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager. diff --git a/core/lib/Drupal/Core/Entity/EntityControllerInterface.php b/core/lib/Drupal/Core/Entity/EntityControllerInterface.php index 79232c1..f78058a 100644 --- a/core/lib/Drupal/Core/Entity/EntityControllerInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityControllerInterface.php @@ -7,7 +7,6 @@ namespace Drupal\Core\Entity; -use Drupal\Core\Entity\EntityStorageControllerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** diff --git a/core/lib/Drupal/Core/Entity/EntityListController.php b/core/lib/Drupal/Core/Entity/EntityList.php similarity index 89% rename from core/lib/Drupal/Core/Entity/EntityListController.php rename to core/lib/Drupal/Core/Entity/EntityList.php index 64c1c43..7062f6a 100644 --- a/core/lib/Drupal/Core/Entity/EntityListController.php +++ b/core/lib/Drupal/Core/Entity/EntityList.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\Core\Entity\EntityListController. + * Contains \Drupal\Core\Entity\EntityList. */ namespace Drupal\Core\Entity; @@ -13,9 +13,9 @@ use Drupal\Component\Utility\String; /** - * Provides a generic implementation of an entity list controller. + * Provides a generic implementation of an entity list. */ -class EntityListController implements EntityListControllerInterface, EntityControllerInterface { +class EntityList implements EntityListInterface, EntityControllerInterface { /** * The entity storage controller class. @@ -67,7 +67,7 @@ public static function createInstance(ContainerInterface $container, $entity_typ } /** - * Constructs a new EntityListController object. + * Constructs a new EntityList object. * * @param string $entity_type * The type of entity to be listed. @@ -86,14 +86,14 @@ public function __construct($entity_type, array $entity_info, EntityStorageContr } /** - * Implements \Drupal\Core\Entity\EntityListControllerInterface::getStorageController(). + * {@inheritdoc} */ public function getStorageController() { return $this->storage; } /** - * Implements \Drupal\Core\Entity\EntityListControllerInterface::load(). + * {@inheritdoc} */ public function load() { return $this->storage->loadMultiple(); @@ -145,7 +145,7 @@ public function getOperations(EntityInterface $entity) { * @return array * A render array structure of header strings. * - * @see \Drupal\Core\Entity\EntityListController::render() + * @see \Drupal\Core\Entity\EntityList::render() */ public function buildHeader() { $row['operations'] = $this->t('Operations'); @@ -161,7 +161,7 @@ public function buildHeader() { * @return array * A render array structure of fields for this entity. * - * @see \Drupal\Core\Entity\EntityListController::render() + * @see \Drupal\Core\Entity\EntityList::render() */ public function buildRow(EntityInterface $entity) { $row['operations']['data'] = $this->buildOperations($entity); @@ -177,7 +177,7 @@ public function buildRow(EntityInterface $entity) { * @return array * A renderable array of operation links. * - * @see \Drupal\Core\Entity\EntityListController::render() + * @see \Drupal\Core\Entity\EntityList::render() */ public function buildOperations(EntityInterface $entity) { // Retrieve and sort operations. @@ -192,7 +192,7 @@ public function buildOperations(EntityInterface $entity) { } /** - * Implements \Drupal\Core\Entity\EntityListControllerInterface::render(). + * {@inheritdoc} * * Builds the entity list as renderable array for theme_table(). * diff --git a/core/lib/Drupal/Core/Entity/EntityListControllerInterface.php b/core/lib/Drupal/Core/Entity/EntityListInterface.php similarity index 85% rename from core/lib/Drupal/Core/Entity/EntityListControllerInterface.php rename to core/lib/Drupal/Core/Entity/EntityListInterface.php index b7581d8..af325bb 100644 --- a/core/lib/Drupal/Core/Entity/EntityListControllerInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityListInterface.php @@ -2,21 +2,21 @@ /** * @file - * Contains \Drupal\Core\Entity\EntityListControllerInterface. + * Contains \Drupal\Core\Entity\EntityListInterface. */ namespace Drupal\Core\Entity; /** - * Defines an interface for entity list controllers. + * Defines an interface for entity lists. */ -interface EntityListControllerInterface { +interface EntityListInterface { /** * Gets the entity storage controller. * * @return \Drupal\Core\Entity\EntityStorageControllerInterface - * The storage controller used by this list controller. + * The storage controller used by this list. */ public function getStorageController(); diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php index 83a671c..8468b61 100644 --- a/core/lib/Drupal/Core/Entity/EntityManager.php +++ b/core/lib/Drupal/Core/Entity/EntityManager.php @@ -209,7 +209,7 @@ public function getStorageController($entity_type) { /** * {@inheritdoc} */ - public function getListController($entity_type) { + public function getList($entity_type) { if (!isset($this->controllers['listing'][$entity_type])) { $class = $this->getControllerClass($entity_type, 'list'); if (in_array('Drupal\Core\Entity\EntityControllerInterface', class_implements($class))) { diff --git a/core/lib/Drupal/Core/Entity/EntityManagerInterface.php b/core/lib/Drupal/Core/Entity/EntityManagerInterface.php index fdc9666..7a9fa5c 100644 --- a/core/lib/Drupal/Core/Entity/EntityManagerInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityManagerInterface.php @@ -163,15 +163,15 @@ public function getViewBuilder($entity_type); public function getAdminPath($entity_type, $bundle); /** - * Creates a new list controller instance. + * Creates a new entity list. * * @param string $entity_type - * The entity type for this list controller. + * The entity type for this list. * - * @return \Drupal\Core\Entity\EntityListControllerInterface - * A list controller instance. + * @return \Drupal\Core\Entity\EntityListInterface + * An entity list instance. */ - public function getListController($entity_type); + public function getList($entity_type); /** * Creates a new form controller instance. diff --git a/core/modules/action/action.module b/core/modules/action/action.module index 5ecfb63..1127bf4 100644 --- a/core/modules/action/action.module +++ b/core/modules/action/action.module @@ -63,6 +63,7 @@ function action_entity_info(&$entity_info) { $entity_info['action']['controllers']['form']['add'] = 'Drupal\action\ActionAddFormController'; $entity_info['action']['controllers']['form']['edit'] = 'Drupal\action\ActionEditFormController'; $entity_info['action']['controllers']['form']['delete'] = 'Drupal\action\Form\ActionDeleteForm'; - $entity_info['action']['controllers']['list'] = 'Drupal\action\ActionListController'; + $entity_info['action']['controllers']['list'] = 'Drupal\action\ActionList'; $entity_info['action']['links']['edit-form'] = 'action.admin_configure'; } + diff --git a/core/modules/action/lib/Drupal/action/ActionListController.php b/core/modules/action/lib/Drupal/action/ActionList.php similarity index 91% rename from core/modules/action/lib/Drupal/action/ActionListController.php rename to core/modules/action/lib/Drupal/action/ActionList.php index 405f224..536a6aa 100644 --- a/core/modules/action/lib/Drupal/action/ActionListController.php +++ b/core/modules/action/lib/Drupal/action/ActionList.php @@ -2,15 +2,14 @@ /** * @file - * Contains \Drupal\action\ActionListController. + * Contains \Drupal\action\ActionList. */ namespace Drupal\action; use Drupal\Core\Action\ActionManager; -use Drupal\Core\Entity\EntityControllerInterface; use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Config\Entity\ConfigEntityListController; +use Drupal\Core\Config\Entity\ConfigEntityList; use Drupal\Core\Entity\EntityStorageControllerInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -18,7 +17,7 @@ /** * Provides a listing of Actions. */ -class ActionListController extends ConfigEntityListController implements EntityControllerInterface { +class ActionList extends ConfigEntityList { /** * @var bool @@ -33,7 +32,7 @@ class ActionListController extends ConfigEntityListController implements EntityC protected $actionManager; /** - * Constructs a new ActionListController object. + * Constructs a new ActionList object. * * @param string $entity_type * The entity type. diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockListController.php b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockList.php similarity index 84% rename from core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockListController.php rename to core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockList.php index efa31b3..42f371d 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockListController.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockList.php @@ -2,18 +2,18 @@ /** * @file - * Contains \Drupal\custom_block\CustomBlockListController. + * Contains \Drupal\custom_block\CustomBlockList. */ namespace Drupal\custom_block; use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Entity\EntityListController; +use Drupal\Core\Entity\EntityList; /** * Provides a listing of custom block entities. */ -class CustomBlockListController extends EntityListController { +class CustomBlockList extends EntityList { /** * {@inheritdoc} diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTypeListController.php b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTypeList.php similarity index 76% rename from core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTypeListController.php rename to core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTypeList.php index 070171d..23e41d3 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTypeListController.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTypeList.php @@ -2,18 +2,18 @@ /** * @file - * Contains \Drupal\custom_block\CustomBlockTypeListController. + * Contains \Drupal\custom_block\CustomBlockTypeList. */ namespace Drupal\custom_block; -use Drupal\Core\Config\Entity\ConfigEntityListController; +use Drupal\Core\Config\Entity\ConfigEntityList; use Drupal\Core\Entity\EntityInterface; /** * Provides a listing of custom block types. */ -class CustomBlockTypeListController extends ConfigEntityListController { +class CustomBlockTypeList extends ConfigEntityList { /** * {@inheritdoc} @@ -29,7 +29,7 @@ public function getOperations(EntityInterface $entity) { } /** - * Overrides \Drupal\Core\Entity\EntityListController::buildHeader(). + * {@inheritdoc} */ public function buildHeader() { $header['type'] = t('Block type'); @@ -38,7 +38,7 @@ public function buildHeader() { } /** - * Overrides \Drupal\Core\Entity\EntityListController::buildRow(). + * {@inheritdoc} */ public function buildRow(EntityInterface $entity) { $uri = $entity->uri(); diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php index 88bb576..eb77967 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php @@ -24,7 +24,7 @@ * controllers = { * "storage" = "Drupal\custom_block\CustomBlockStorageController", * "access" = "Drupal\custom_block\CustomBlockAccessController", - * "list" = "Drupal\custom_block\CustomBlockListController", + * "list" = "Drupal\custom_block\CustomBlockList", * "view_builder" = "Drupal\custom_block\CustomBlockViewBuilder", * "form" = { * "add" = "Drupal\custom_block\CustomBlockFormController", diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlockType.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlockType.php index c6340c6..3bd293a 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlockType.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlockType.php @@ -27,7 +27,7 @@ * "edit" = "Drupal\custom_block\CustomBlockTypeFormController", * "delete" = "Drupal\custom_block\Form\CustomBlockTypeDeleteForm" * }, - * "list" = "Drupal\custom_block\CustomBlockTypeListController" + * "list" = "Drupal\custom_block\CustomBlockTypeList" * }, * admin_permission = "administer blocks", * config_prefix = "custom_block.type", diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockListTest.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockListTest.php index 3678a23..2f3441c 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockListTest.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockListTest.php @@ -12,7 +12,7 @@ /** * Tests the listing of custom blocks. * - * @see \Drupal\block\CustomBlockListController + * @see \Drupal\block\CustomBlockList */ class CustomBlockListTest extends WebTestBase { diff --git a/core/modules/block/lib/Drupal/block/BlockListController.php b/core/modules/block/lib/Drupal/block/BlockList.php similarity index 96% rename from core/modules/block/lib/Drupal/block/BlockListController.php rename to core/modules/block/lib/Drupal/block/BlockList.php index 9524b0d..fdefd84 100644 --- a/core/modules/block/lib/Drupal/block/BlockListController.php +++ b/core/modules/block/lib/Drupal/block/BlockList.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\block\BlockListController. + * Contains \Drupal\block\BlockList. */ namespace Drupal\block; @@ -10,8 +10,7 @@ use Drupal\Component\Plugin\PluginManagerInterface; use Drupal\Component\Utility\Json; use Drupal\Component\Utility\String; -use Drupal\Core\Config\Entity\ConfigEntityListController; -use Drupal\Core\Entity\EntityControllerInterface; +use Drupal\Core\Config\Entity\ConfigEntityList; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityStorageControllerInterface; use Drupal\Core\Extension\ModuleHandlerInterface; @@ -20,9 +19,9 @@ use Symfony\Component\HttpFoundation\Request; /** - * Defines the block list controller. + * Defines the block list. */ -class BlockListController extends ConfigEntityListController implements FormInterface, EntityControllerInterface { +class BlockList extends ConfigEntityList implements FormInterface { /** * The regions containing the blocks. @@ -53,7 +52,7 @@ class BlockListController extends ConfigEntityListController implements FormInte protected $blockManager; /** - * Constructs a new BlockListController object. + * Constructs a new BlockList object. * * @param string $entity_type * The type of entity to be listed. @@ -86,7 +85,7 @@ public static function createInstance(ContainerInterface $container, $entity_typ } /** - * Overrides \Drupal\Core\Config\Entity\ConfigEntityListController::load(). + * {@inheritdoc} */ public function load() { // If no theme was specified, use the current theme. @@ -107,7 +106,7 @@ public function load() { } /** - * Overrides \Drupal\Core\Entity\EntityListController::render(). + * {@inheritdoc} * * @param string|null $theme * (optional) The theme to display the blocks for. If NULL, the current diff --git a/core/modules/block/lib/Drupal/block/Controller/BlockListController.php b/core/modules/block/lib/Drupal/block/Controller/BlockListController.php index 2852970..a040fa3 100644 --- a/core/modules/block/lib/Drupal/block/Controller/BlockListController.php +++ b/core/modules/block/lib/Drupal/block/Controller/BlockListController.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\block\Controller\BlockListController. + * Contains \Drupal\block\Controller\BlockList. */ namespace Drupal\block\Controller; @@ -29,7 +29,7 @@ class BlockListController extends EntityListController { */ public function listing($theme = NULL, Request $request = NULL) { $theme = $theme ?: $this->config('system.theme')->get('default'); - return $this->entityManager()->getListController('block')->render($theme, $request); + return $this->entityManager()->getList('block')->render($theme, $request); } } diff --git a/core/modules/block/lib/Drupal/block/Entity/Block.php b/core/modules/block/lib/Drupal/block/Entity/Block.php index 02b1d76..fa214da 100644 --- a/core/modules/block/lib/Drupal/block/Entity/Block.php +++ b/core/modules/block/lib/Drupal/block/Entity/Block.php @@ -24,7 +24,7 @@ * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController", * "access" = "Drupal\block\BlockAccessController", * "view_builder" = "Drupal\block\BlockViewBuilder", - * "list" = "Drupal\block\BlockListController", + * "list" = "Drupal\block\BlockList", * "form" = { * "default" = "Drupal\block\BlockFormController", * "delete" = "Drupal\block\Form\BlockDeleteForm" diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityListTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityListTest.php index d1dc721..83c9d59 100644 --- a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityListTest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityListTest.php @@ -32,11 +32,11 @@ public static function getInfo() { } /** - * Tests entity list controller methods. + * Tests entity list methods. */ function testList() { $controller = $this->container->get('entity.manager') - ->getListController('config_test'); + ->getList('config_test'); // Test getStorageController() method. $this->assertTrue($controller->getStorageController() instanceof EntityStorageControllerInterface, 'EntityStorageController instance in storage.'); @@ -124,7 +124,7 @@ function testList() { // Test that config entities that do not support status, do not have // enable/disable operations. $controller = $this->container->get('entity.manager') - ->getListController('config_test_no_status'); + ->getList('config_test_no_status'); $list = $controller->load(); $entity = $list['default']; diff --git a/core/modules/config/tests/config_test/lib/Drupal/config_test/ConfigTestListController.php b/core/modules/config/tests/config_test/lib/Drupal/config_test/ConfigTestList.php similarity index 68% rename from core/modules/config/tests/config_test/lib/Drupal/config_test/ConfigTestListController.php rename to core/modules/config/tests/config_test/lib/Drupal/config_test/ConfigTestList.php index 564876a..0eafd4d 100644 --- a/core/modules/config/tests/config_test/lib/Drupal/config_test/ConfigTestListController.php +++ b/core/modules/config/tests/config_test/lib/Drupal/config_test/ConfigTestList.php @@ -2,18 +2,18 @@ /** * @file - * Contains \Drupal\config_test\ConfigTestListController. + * Contains \Drupal\config_test\ConfigTestList. */ namespace Drupal\config_test; -use Drupal\Core\Config\Entity\ConfigEntityListController; +use Drupal\Core\Config\Entity\ConfigEntityList; use Drupal\Core\Entity\EntityInterface; /** - * Provides a list controller for config_test. + * Provides a list for config_test. */ -class ConfigTestListController extends ConfigEntityListController { +class ConfigTestList extends ConfigEntityList { /** * {@inheritdoc} diff --git a/core/modules/config/tests/config_test/lib/Drupal/config_test/Entity/ConfigQueryTest.php b/core/modules/config/tests/config_test/lib/Drupal/config_test/Entity/ConfigQueryTest.php index a4c7e8c..6d85551 100644 --- a/core/modules/config/tests/config_test/lib/Drupal/config_test/Entity/ConfigQueryTest.php +++ b/core/modules/config/tests/config_test/lib/Drupal/config_test/Entity/ConfigQueryTest.php @@ -18,7 +18,7 @@ * label = @Translation("Test configuration for query"), * controllers = { * "storage" = "Drupal\config_test\ConfigTestStorageController", - * "list" = "Drupal\Core\Config\Entity\ConfigEntityListController", + * "list" = "Drupal\Core\Config\Entity\ConfigEntityList", * "form" = { * "default" = "Drupal\config_test\ConfigTestFormController" * } diff --git a/core/modules/config/tests/config_test/lib/Drupal/config_test/Entity/ConfigTest.php b/core/modules/config/tests/config_test/lib/Drupal/config_test/Entity/ConfigTest.php index 3df6365..aa7737d 100644 --- a/core/modules/config/tests/config_test/lib/Drupal/config_test/Entity/ConfigTest.php +++ b/core/modules/config/tests/config_test/lib/Drupal/config_test/Entity/ConfigTest.php @@ -20,7 +20,7 @@ * label = @Translation("Test configuration"), * controllers = { * "storage" = "Drupal\config_test\ConfigTestStorageController", - * "list" = "Drupal\config_test\ConfigTestListController", + * "list" = "Drupal\config_test\ConfigTestList", * "form" = { * "default" = "Drupal\config_test\ConfigTestFormController", * "delete" = "Drupal\config_test\Form\ConfigTestDeleteForm" diff --git a/core/modules/config_translation/lib/Drupal/config_translation/ConfigMapperManager.php b/core/modules/config_translation/lib/Drupal/config_translation/ConfigMapperManager.php index edb431c..f83b650 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/ConfigMapperManager.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/ConfigMapperManager.php @@ -41,7 +41,7 @@ class ConfigMapperManager extends DefaultPluginManager implements ConfigMapperMa 'names' => array(), 'weight' => 20, 'class' => '\Drupal\config_translation\ConfigNamesMapper', - 'list_controller' => 'Drupal\config_translation\Controller\ConfigTranslationEntityListController', + 'list_controller' => 'Drupal\config_translation\Controller\ConfigTranslationEntityList', ); /** @@ -120,8 +120,8 @@ public function processDefinition(&$definition, $plugin_id) { throw new InvalidMapperDefinitionException($plugin_id, String::format("The plugin definition of the mapper '%plugin_id' does not contain a base_route_name.", array('%plugin_id' => $plugin_id))); } - if (!is_subclass_of($definition['list_controller'], 'Drupal\config_translation\Controller\ConfigTranslationEntityListControllerInterface')) { - throw new InvalidMapperDefinitionException($plugin_id, String::format("The list_controller '%list_controller' for plugin '%plugin_id' does not implement the expected interface Drupal\config_translation\Controller\ConfigTranslationEntityListControllerInterface.", array('%list_controller' => $definition['list_controller'], '%plugin_id' => $plugin_id))); + if (!is_subclass_of($definition['list_controller'], 'Drupal\config_translation\Controller\ConfigTranslationEntityListInterface')) { + throw new InvalidMapperDefinitionException($plugin_id, String::format("The list_controller '%list_controller' for plugin '%plugin_id' does not implement the expected interface Drupal\config_translation\Controller\ConfigTranslationEntityListInterface.", array('%list_controller' => $definition['list_controller'], '%plugin_id' => $plugin_id))); } } diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationBlockListController.php b/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationBlockListController.php index bd0f6f5..18639f7 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationBlockListController.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationBlockListController.php @@ -15,7 +15,7 @@ /** * Defines the config translation controller for blocks. */ -class ConfigTranslationBlockListController extends ConfigTranslationEntityListController { +class ConfigTranslationBlockListController extends ConfigTranslationEntityList { /** * An array of theme info keyed by theme name. diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationEntityListController.php b/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationEntityList.php similarity index 94% rename from core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationEntityListController.php rename to core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationEntityList.php index 09a9de6..9bc7d66 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationEntityListController.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationEntityList.php @@ -2,18 +2,18 @@ /** * @file - * Contains \Drupal\config_translation\Controller\ConfigTranslationEntityListController. + * Contains \Drupal\config_translation\Controller\ConfigTranslationEntityList. */ namespace Drupal\config_translation\Controller; use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Entity\EntityListController; +use Drupal\Core\Entity\EntityList; /** * Defines the configuration translation controller for entities. */ -class ConfigTranslationEntityListController extends EntityListController implements ConfigTranslationEntityListControllerInterface { +class ConfigTranslationEntityList extends EntityList implements ConfigTranslationEntityListInterface { /** * Provides user facing strings for the filter element. diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationEntityListControllerInterface.php b/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationEntityListInterface.php similarity index 72% rename from core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationEntityListControllerInterface.php rename to core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationEntityListInterface.php index d342808..d1252d6 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationEntityListControllerInterface.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationEntityListInterface.php @@ -2,17 +2,17 @@ /** * @file - * Contains \Drupal\config_translation\Controller\ConfigTranslationEntityListControllerInterface. + * Contains \Drupal\config_translation\Controller\ConfigTranslationEntityListInterface. */ namespace Drupal\config_translation\Controller; -use Drupal\Core\Entity\EntityListControllerInterface; +use Drupal\Core\Entity\EntityListInterface; /** * Defines an interface for configuration translation entity list controllers. */ -interface ConfigTranslationEntityListControllerInterface extends EntityListControllerInterface { +interface ConfigTranslationEntityListInterface extends EntityListInterface { /** * Sorts an array by value. diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationFieldInstanceListController.php b/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationFieldInstanceListController.php index d7ad320..69354cb 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationFieldInstanceListController.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationFieldInstanceListController.php @@ -19,7 +19,7 @@ /** * Defines the config translation controller for field instance entities. */ -class ConfigTranslationFieldInstanceListController extends ConfigTranslationEntityListController { +class ConfigTranslationFieldInstanceListController extends ConfigTranslationEntityList { /** * The name of the entity type the field instances are attached to. diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationListController.php b/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationListController.php index 48ecad7..b945e01 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationListController.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationListController.php @@ -75,7 +75,7 @@ public function listing() { // node_type and block, fallback to the generic configuration translation // list controller. $class = $this->mapperDefinition['list_controller']; - /** @var \Drupal\config_translation\Controller\ConfigTranslationEntityListControllerInterface $controller */ + /** @var \Drupal\config_translation\Controller\ConfigTranslationEntityListInterface $controller */ $controller = new $class($entity_type, $this->entityManager()->getDefinition($entity_type), $this->entityManager()->getStorageController($entity_type), $this->moduleHandler(), $this->entityManager(), $this->mapperDefinition); $build = $controller->render(); $build['#title'] = $this->mapper->getTypeLabel(); diff --git a/core/modules/contact/lib/Drupal/contact/CategoryListController.php b/core/modules/contact/lib/Drupal/contact/CategoryList.php similarity index 75% rename from core/modules/contact/lib/Drupal/contact/CategoryListController.php rename to core/modules/contact/lib/Drupal/contact/CategoryList.php index 1e62630..9def7b3 100644 --- a/core/modules/contact/lib/Drupal/contact/CategoryListController.php +++ b/core/modules/contact/lib/Drupal/contact/CategoryList.php @@ -1,21 +1,21 @@ getLabel($entity); diff --git a/core/modules/contact/lib/Drupal/contact/Entity/Category.php b/core/modules/contact/lib/Drupal/contact/Entity/Category.php index 488f2e7..3b346f0 100644 --- a/core/modules/contact/lib/Drupal/contact/Entity/Category.php +++ b/core/modules/contact/lib/Drupal/contact/Entity/Category.php @@ -22,7 +22,7 @@ * controllers = { * "storage" = "Drupal\contact\CategoryStorageController", * "access" = "Drupal\contact\CategoryAccessController", - * "list" = "Drupal\contact\CategoryListController", + * "list" = "Drupal\contact\CategoryList", * "form" = { * "add" = "Drupal\contact\CategoryFormController", * "edit" = "Drupal\contact\CategoryFormController", diff --git a/core/modules/entity/lib/Drupal/entity/Entity/EntityFormMode.php b/core/modules/entity/lib/Drupal/entity/Entity/EntityFormMode.php index 8e2284b..383461a 100644 --- a/core/modules/entity/lib/Drupal/entity/Entity/EntityFormMode.php +++ b/core/modules/entity/lib/Drupal/entity/Entity/EntityFormMode.php @@ -33,7 +33,7 @@ * id = "form_mode", * label = @Translation("Form mode"), * controllers = { - * "list" = "Drupal\entity\EntityFormModeListController", + * "list" = "Drupal\entity\EntityFormModeList", * "form" = { * "add" = "Drupal\entity\Form\EntityFormModeAddForm", * "edit" = "Drupal\entity\Form\EntityDisplayModeEditForm", diff --git a/core/modules/entity/lib/Drupal/entity/Entity/EntityViewMode.php b/core/modules/entity/lib/Drupal/entity/Entity/EntityViewMode.php index 1d17d5e..cb1df99 100644 --- a/core/modules/entity/lib/Drupal/entity/Entity/EntityViewMode.php +++ b/core/modules/entity/lib/Drupal/entity/Entity/EntityViewMode.php @@ -34,7 +34,7 @@ * id = "view_mode", * label = @Translation("View mode"), * controllers = { - * "list" = "Drupal\entity\EntityDisplayModeListController", + * "list" = "Drupal\entity\EntityDisplayModeList", * "form" = { * "add" = "Drupal\entity\Form\EntityDisplayModeAddForm", * "edit" = "Drupal\entity\Form\EntityDisplayModeEditForm", diff --git a/core/modules/entity/lib/Drupal/entity/EntityDisplayModeListController.php b/core/modules/entity/lib/Drupal/entity/EntityDisplayModeList.php similarity index 94% rename from core/modules/entity/lib/Drupal/entity/EntityDisplayModeListController.php rename to core/modules/entity/lib/Drupal/entity/EntityDisplayModeList.php index 835c1c6..bfe5893 100644 --- a/core/modules/entity/lib/Drupal/entity/EntityDisplayModeListController.php +++ b/core/modules/entity/lib/Drupal/entity/EntityDisplayModeList.php @@ -2,12 +2,12 @@ /** * @file - * Contains \Drupal\entity\EntityDisplayModeListController. + * Contains \Drupal\entity\EntityDisplayModeList. */ namespace Drupal\entity; -use Drupal\Core\Config\Entity\ConfigEntityListController; +use Drupal\Core\Config\Entity\ConfigEntityList; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityStorageControllerInterface; use Drupal\Core\Extension\ModuleHandlerInterface; @@ -16,7 +16,7 @@ /** * Provides the listing for entity display modes. */ -class EntityDisplayModeListController extends ConfigEntityListController { +class EntityDisplayModeList extends ConfigEntityList { /** * The entity info for all entity types. @@ -26,7 +26,7 @@ class EntityDisplayModeListController extends ConfigEntityListController { protected $entityInfoComplete; /** - * Constructs a new EntityListController object. + * Constructs a new EntityList object. * * @param string $entity_type * The type of entity to be listed. diff --git a/core/modules/entity/lib/Drupal/entity/EntityFormModeListController.php b/core/modules/entity/lib/Drupal/entity/EntityFormModeList.php similarity index 80% rename from core/modules/entity/lib/Drupal/entity/EntityFormModeListController.php rename to core/modules/entity/lib/Drupal/entity/EntityFormModeList.php index 79417ff..b795eef 100644 --- a/core/modules/entity/lib/Drupal/entity/EntityFormModeListController.php +++ b/core/modules/entity/lib/Drupal/entity/EntityFormModeList.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\entity\EntityFormModeListController. + * Contains \Drupal\entity\EntityFormModeList. */ namespace Drupal\entity; @@ -10,7 +10,7 @@ /** * Provides the listing for entity display modes. */ -class EntityFormModeListController extends EntityDisplayModeListController { +class EntityFormModeList extends EntityDisplayModeList { /** * Filters entities based on their controllers. diff --git a/core/modules/field_ui/field_ui.module b/core/modules/field_ui/field_ui.module index 2033cf6..64a45bc 100644 --- a/core/modules/field_ui/field_ui.module +++ b/core/modules/field_ui/field_ui.module @@ -164,7 +164,7 @@ function field_ui_element_info() { */ function field_ui_entity_info(&$entity_info) { $entity_info['field_instance']['controllers']['form']['delete'] = 'Drupal\field_ui\Form\FieldDeleteForm'; - $entity_info['field_entity']['controllers']['list'] = 'Drupal\field_ui\FieldListController'; + $entity_info['field_entity']['controllers']['list'] = 'Drupal\field_ui\FieldList'; } /** diff --git a/core/modules/field_ui/lib/Drupal/field_ui/FieldListController.php b/core/modules/field_ui/lib/Drupal/field_ui/FieldList.php similarity index 93% rename from core/modules/field_ui/lib/Drupal/field_ui/FieldListController.php rename to core/modules/field_ui/lib/Drupal/field_ui/FieldList.php index 16ecfe9..3d5f9f4 100644 --- a/core/modules/field_ui/lib/Drupal/field_ui/FieldListController.php +++ b/core/modules/field_ui/lib/Drupal/field_ui/FieldList.php @@ -2,12 +2,12 @@ /** * @file - * Contains \Drupal\field_ui\FieldListController. + * Contains \Drupal\field_ui\FieldList. */ namespace Drupal\field_ui; -use Drupal\Core\Config\Entity\ConfigEntityListController; +use Drupal\Core\Config\Entity\ConfigEntityList; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Field\FieldTypePluginManager; @@ -17,7 +17,7 @@ /** * Provides a listing of fields. */ -class FieldListController extends ConfigEntityListController { +class FieldList extends ConfigEntityList { /** * An array of information about field types. @@ -48,7 +48,7 @@ class FieldListController extends ConfigEntityListController { protected $fieldTypeManager; /** - * Constructs a new EntityListController object. + * Constructs a new EntityList object. * * @param string $entity_type * The type of entity to be listed. diff --git a/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php b/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php index 9571584..3ee5027 100644 --- a/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php +++ b/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php @@ -26,7 +26,7 @@ * "edit" = "Drupal\filter\FilterFormatEditFormController", * "disable" = "Drupal\filter\Form\FilterDisableForm" * }, - * "list" = "Drupal\filter\FilterFormatListController", + * "list" = "Drupal\filter\FilterFormatList", * "access" = "Drupal\filter\FilterFormatAccessController", * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController" * }, diff --git a/core/modules/filter/lib/Drupal/filter/FilterFormatListController.php b/core/modules/filter/lib/Drupal/filter/FilterFormatList.php similarity index 93% rename from core/modules/filter/lib/Drupal/filter/FilterFormatListController.php rename to core/modules/filter/lib/Drupal/filter/FilterFormatList.php index cd94f86..5cf795a 100644 --- a/core/modules/filter/lib/Drupal/filter/FilterFormatListController.php +++ b/core/modules/filter/lib/Drupal/filter/FilterFormatList.php @@ -2,14 +2,14 @@ /** * @file - * Contains \Drupal\filter\FilterFormatListController. + * Contains \Drupal\filter\FilterFormatList. */ namespace Drupal\filter; use Drupal\Component\Utility\String; use Drupal\Core\Config\ConfigFactory; -use Drupal\Core\Config\Entity\DraggableListController; +use Drupal\Core\Config\Entity\DraggableListBase; use Drupal\Core\Entity\EntityControllerInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityStorageControllerInterface; @@ -17,9 +17,9 @@ use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Defines the filter format list controller. + * Defines the filter format list. */ -class FilterFormatListController extends DraggableListController implements EntityControllerInterface { +class FilterFormatList extends DraggableListBase implements EntityControllerInterface { /** * {@inheritdoc} @@ -34,7 +34,7 @@ class FilterFormatListController extends DraggableListController implements Enti protected $configFactory; /** - * Constructs a new FilterFormatListController. + * Constructs a new FilterFormatList. * * @param string $entity_type * The type of entity to be listed. diff --git a/core/modules/image/lib/Drupal/image/Entity/ImageStyle.php b/core/modules/image/lib/Drupal/image/Entity/ImageStyle.php index 1b25465..72671c6 100644 --- a/core/modules/image/lib/Drupal/image/Entity/ImageStyle.php +++ b/core/modules/image/lib/Drupal/image/Entity/ImageStyle.php @@ -32,7 +32,7 @@ * "flush" = "Drupal\image\Form\ImageStyleFlushForm" * }, * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController", - * "list" = "Drupal\image\ImageStyleListController", + * "list" = "Drupal\image\ImageStyleList", * }, * admin_permission = "administer image styles", * config_prefix = "image.style", diff --git a/core/modules/image/lib/Drupal/image/ImageStyleListController.php b/core/modules/image/lib/Drupal/image/ImageStyleList.php similarity index 89% rename from core/modules/image/lib/Drupal/image/ImageStyleListController.php rename to core/modules/image/lib/Drupal/image/ImageStyleList.php index 3c4f3e7..44d4928 100644 --- a/core/modules/image/lib/Drupal/image/ImageStyleListController.php +++ b/core/modules/image/lib/Drupal/image/ImageStyleList.php @@ -2,13 +2,12 @@ /** * @file - * Contains \Drupal\image\ImageStyleListController. + * Contains \Drupal\image\ImageStyleList. */ namespace Drupal\image; -use Drupal\Core\Config\Entity\ConfigEntityListController; -use Drupal\Core\Entity\EntityControllerInterface; +use Drupal\Core\Config\Entity\ConfigEntityList; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityStorageControllerInterface; use Drupal\Core\Extension\ModuleHandlerInterface; @@ -19,7 +18,7 @@ /** * Provides a listing of image styles. */ -class ImageStyleListController extends ConfigEntityListController implements EntityControllerInterface { +class ImageStyleList extends ConfigEntityList { /** * The URL generator. @@ -29,7 +28,7 @@ class ImageStyleListController extends ConfigEntityListController implements Ent protected $urlGenerator; /** - * Constructs a new ImageStyleListController object. + * Constructs a new ImageStyleList object. * * @param string $entity_type * The type of entity to be listed. diff --git a/core/modules/language/lib/Drupal/language/Entity/Language.php b/core/modules/language/lib/Drupal/language/Entity/Language.php index 8580d87..e6c9532 100644 --- a/core/modules/language/lib/Drupal/language/Entity/Language.php +++ b/core/modules/language/lib/Drupal/language/Entity/Language.php @@ -22,7 +22,7 @@ * label = @Translation("Language"), * controllers = { * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController", - * "list" = "Drupal\language\LanguageListController", + * "list" = "Drupal\language\LanguageList", * "access" = "Drupal\language\LanguageAccessController", * "form" = { * "add" = "Drupal\language\Form\LanguageAddForm", diff --git a/core/modules/language/lib/Drupal/language/LanguageListController.php b/core/modules/language/lib/Drupal/language/LanguageList.php similarity index 93% rename from core/modules/language/lib/Drupal/language/LanguageListController.php rename to core/modules/language/lib/Drupal/language/LanguageList.php index 35724b7..1a7651d 100644 --- a/core/modules/language/lib/Drupal/language/LanguageListController.php +++ b/core/modules/language/lib/Drupal/language/LanguageList.php @@ -1,18 +1,18 @@ 'Drupal\menu\MenuFormController', @@ -718,3 +718,4 @@ function menu_library_info() { return $libraries; } + diff --git a/core/modules/node/lib/Drupal/node/Entity/Node.php b/core/modules/node/lib/Drupal/node/Entity/Node.php index 968184a..be65cb2 100644 --- a/core/modules/node/lib/Drupal/node/Entity/Node.php +++ b/core/modules/node/lib/Drupal/node/Entity/Node.php @@ -30,7 +30,7 @@ * "delete" = "Drupal\node\Form\NodeDeleteForm", * "edit" = "Drupal\node\NodeFormController" * }, - * "list" = "Drupal\node\NodeListController", + * "list" = "Drupal\node\NodeList", * "translation" = "Drupal\node\NodeTranslationController" * }, * base_table = "node", diff --git a/core/modules/node/lib/Drupal/node/Entity/NodeType.php b/core/modules/node/lib/Drupal/node/Entity/NodeType.php index b06c583..312edbd 100644 --- a/core/modules/node/lib/Drupal/node/Entity/NodeType.php +++ b/core/modules/node/lib/Drupal/node/Entity/NodeType.php @@ -27,7 +27,7 @@ * "edit" = "Drupal\node\NodeTypeFormController", * "delete" = "Drupal\node\Form\NodeTypeDeleteConfirm" * }, - * "list" = "Drupal\node\NodeTypeListController", + * "list" = "Drupal\node\NodeTypeList", * }, * admin_permission = "administer content types", * config_prefix = "node.type", diff --git a/core/modules/node/lib/Drupal/node/NodeListController.php b/core/modules/node/lib/Drupal/node/NodeList.php similarity index 94% rename from core/modules/node/lib/Drupal/node/NodeListController.php rename to core/modules/node/lib/Drupal/node/NodeList.php index f7770d5..313f425 100644 --- a/core/modules/node/lib/Drupal/node/NodeListController.php +++ b/core/modules/node/lib/Drupal/node/NodeList.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\node\NodeListController. + * Contains \Drupal\node\NodeList. */ namespace Drupal\node; @@ -10,7 +10,7 @@ use Drupal\Component\Utility\String; use Drupal\Core\Datetime\Date; use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Entity\EntityListController; +use Drupal\Core\Entity\EntityList; use Drupal\Core\Entity\EntityStorageControllerInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Language\Language; @@ -18,9 +18,9 @@ use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Provides a list controller for nodes. + * Lists nodes. */ -class NodeListController extends EntityListController { +class NodeList extends EntityList { /** * The date service. @@ -30,7 +30,7 @@ class NodeListController extends EntityListController { protected $dateService; /** - * Constructs a new NodeListController object. + * Constructs a new NodeList object. * * @param string $entity_type * The type of entity to be listed. diff --git a/core/modules/node/lib/Drupal/node/NodeTypeListController.php b/core/modules/node/lib/Drupal/node/NodeTypeList.php similarity index 92% rename from core/modules/node/lib/Drupal/node/NodeTypeListController.php rename to core/modules/node/lib/Drupal/node/NodeTypeList.php index 0cb406f..357fc47 100644 --- a/core/modules/node/lib/Drupal/node/NodeTypeListController.php +++ b/core/modules/node/lib/Drupal/node/NodeTypeList.php @@ -1,13 +1,12 @@ getLabel($entity); diff --git a/core/modules/system/lib/Drupal/system/DateFormatListController.php b/core/modules/system/lib/Drupal/system/DateFormatList.php similarity index 90% rename from core/modules/system/lib/Drupal/system/DateFormatListController.php rename to core/modules/system/lib/Drupal/system/DateFormatList.php index d22642b..6ca36b2 100644 --- a/core/modules/system/lib/Drupal/system/DateFormatListController.php +++ b/core/modules/system/lib/Drupal/system/DateFormatList.php @@ -2,13 +2,13 @@ /** * @file - * Contains \Drupal\system\DateFormatListController. + * Contains \Drupal\system\DateFormatList. */ namespace Drupal\system; use Drupal\Component\Utility\String; -use Drupal\Core\Config\Entity\ConfigEntityListController; +use Drupal\Core\Config\Entity\ConfigEntityList; use Drupal\Core\Datetime\Date; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityStorageControllerInterface; @@ -18,7 +18,7 @@ /** * Provides a listing of date formats. */ -class DateFormatListController extends ConfigEntityListController { +class DateFormatList extends ConfigEntityList { /** * The date service. @@ -28,7 +28,7 @@ class DateFormatListController extends ConfigEntityListController { protected $dateService; /** - * Constructs a new DateFormatListController object. + * Constructs a new DateFormatList object. * * @param string $entity_type * The type of entity to be listed. diff --git a/core/modules/system/lib/Drupal/system/Entity/DateFormat.php b/core/modules/system/lib/Drupal/system/Entity/DateFormat.php index 447f800..c5dbcd7 100644 --- a/core/modules/system/lib/Drupal/system/Entity/DateFormat.php +++ b/core/modules/system/lib/Drupal/system/Entity/DateFormat.php @@ -23,7 +23,7 @@ * controllers = { * "storage" = "Drupal\Core\Config\Entity\ConfigStorageController", * "access" = "Drupal\system\DateFormatAccessController", - * "list" = "Drupal\system\DateFormatListController", + * "list" = "Drupal\system\DateFormatList", * "form" = { * "add" = "Drupal\system\Form\DateFormatAddForm", * "edit" = "Drupal\system\Form\DateFormatEditForm", diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTest.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTest.php index 8ddc008..aa50c07 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTest.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTest.php @@ -21,7 +21,7 @@ * label = @Translation("Test entity"), * controllers = { * "storage" = "Drupal\entity_test\EntityTestStorageController", - * "list" = "Drupal\entity_test\EntityTestListController", + * "list" = "Drupal\entity_test\EntityTestList", * "view_builder" = "Drupal\entity_test\EntityTestViewBuilder", * "access" = "Drupal\entity_test\EntityTestAccessController", * "form" = { diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestListController.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestList.php similarity index 70% rename from core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestListController.php rename to core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestList.php index fddc724..7705de7 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestListController.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestList.php @@ -2,18 +2,18 @@ /** * @file - * Contains \Drupal\entity_test\EntityTestListController. + * Contains \Drupal\entity_test\EntityTestList. */ namespace Drupal\entity_test; use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Entity\EntityListController; +use Drupal\Core\Entity\EntityList; /** - * Provides a list controller for entity_test. + * Provides a list for entity_test. */ -class EntityTestListController extends EntityListController { +class EntityTestList extends EntityList { /** * {@inheritdoc} diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Vocabulary.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Vocabulary.php index e257138..813a0dd 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Vocabulary.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Vocabulary.php @@ -21,7 +21,7 @@ * label = @Translation("Taxonomy vocabulary"), * controllers = { * "storage" = "Drupal\taxonomy\VocabularyStorageController", - * "list" = "Drupal\taxonomy\VocabularyListController", + * "list" = "Drupal\taxonomy\VocabularyList", * "form" = { * "default" = "Drupal\taxonomy\VocabularyFormController", * "reset" = "Drupal\taxonomy\Form\VocabularyResetForm", diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyListController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyList.php similarity index 93% rename from core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyListController.php rename to core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyList.php index ff93ede..744ed2f 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyListController.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyList.php @@ -2,18 +2,18 @@ /** * @file - * Contains \Drupal\taxonomy\VocabularyListController. + * Contains \Drupal\taxonomy\VocabularyList. */ namespace Drupal\taxonomy; -use Drupal\Core\Config\Entity\DraggableListController; +use Drupal\Core\Config\Entity\DraggableListBase; use Drupal\Core\Entity\EntityInterface; /** * Provides a listing of vocabularies. */ -class VocabularyListController extends DraggableListController { +class VocabularyList extends DraggableListBase { /** * {@inheritdoc} diff --git a/core/modules/user/lib/Drupal/user/Controller/UserListController.php b/core/modules/user/lib/Drupal/user/Controller/UserList.php similarity index 95% rename from core/modules/user/lib/Drupal/user/Controller/UserListController.php rename to core/modules/user/lib/Drupal/user/Controller/UserList.php index 7f8da1d..1b1b6a9 100644 --- a/core/modules/user/lib/Drupal/user/Controller/UserListController.php +++ b/core/modules/user/lib/Drupal/user/Controller/UserList.php @@ -2,14 +2,14 @@ /** * @file - * Contains \Drupal\user\Controller\UserListController. + * Contains \Drupal\user\Controller\UserList. */ namespace Drupal\user\Controller; use Drupal\Core\Entity\EntityControllerInterface; use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Entity\EntityListController; +use Drupal\Core\Entity\EntityList; use Drupal\Core\Entity\EntityStorageControllerInterface; use Drupal\Core\Entity\Query\QueryFactory; use Drupal\Core\Extension\ModuleHandlerInterface; @@ -20,7 +20,7 @@ * * @see \Drupal\user\Entity\User */ -class UserListController extends EntityListController implements EntityControllerInterface { +class UserList extends EntityList implements EntityControllerInterface { /** * The entity query factory. @@ -30,7 +30,7 @@ class UserListController extends EntityListController implements EntityControlle protected $queryFactory; /** - * Constructs a new UserListController object. + * Constructs a new UserList object. * * @param string $entity_type * The type of entity to be listed. diff --git a/core/modules/user/lib/Drupal/user/Entity/Role.php b/core/modules/user/lib/Drupal/user/Entity/Role.php index b4e9a12..66f18d9 100644 --- a/core/modules/user/lib/Drupal/user/Entity/Role.php +++ b/core/modules/user/lib/Drupal/user/Entity/Role.php @@ -20,7 +20,7 @@ * controllers = { * "storage" = "Drupal\user\RoleStorageController", * "access" = "Drupal\user\RoleAccessController", - * "list" = "Drupal\user\RoleListController", + * "list" = "Drupal\user\RoleList", * "form" = { * "default" = "Drupal\user\RoleFormController", * "delete" = "Drupal\user\Form\UserRoleDelete" diff --git a/core/modules/user/lib/Drupal/user/Entity/User.php b/core/modules/user/lib/Drupal/user/Entity/User.php index 80fc18a..17f0d12 100644 --- a/core/modules/user/lib/Drupal/user/Entity/User.php +++ b/core/modules/user/lib/Drupal/user/Entity/User.php @@ -22,7 +22,7 @@ * controllers = { * "storage" = "Drupal\user\UserStorageController", * "access" = "Drupal\user\UserAccessController", - * "list" = "Drupal\user\Controller\UserListController", + * "list" = "Drupal\user\Controller\UserList", * "view_builder" = "Drupal\Core\Entity\EntityViewBuilder", * "form" = { * "default" = "Drupal\user\ProfileFormController", diff --git a/core/modules/user/lib/Drupal/user/RoleListController.php b/core/modules/user/lib/Drupal/user/RoleList.php similarity index 89% rename from core/modules/user/lib/Drupal/user/RoleListController.php rename to core/modules/user/lib/Drupal/user/RoleList.php index 4aa4f52..95f52b3 100644 --- a/core/modules/user/lib/Drupal/user/RoleListController.php +++ b/core/modules/user/lib/Drupal/user/RoleList.php @@ -2,18 +2,18 @@ /** * @file - * Contains \Drupal\user\RoleListController. + * Contains \Drupal\user\RoleList. */ namespace Drupal\user; -use Drupal\Core\Config\Entity\DraggableListController; +use Drupal\Core\Config\Entity\DraggableListBase; use Drupal\Core\Entity\EntityInterface; /** * Provides a listing of user roles. */ -class RoleListController extends DraggableListController { +class RoleList extends DraggableListBase { /** * {@inheritdoc} diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Controller/ViewsUIController.php b/core/modules/views_ui/lib/Drupal/views_ui/Controller/ViewsUIController.php index 90c1d58..d356efa 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/Controller/ViewsUIController.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/Controller/ViewsUIController.php @@ -187,7 +187,7 @@ public function ajaxOperation(ViewStorageInterface $view, $op, Request $request) // If the request is via AJAX, return the rendered list as JSON. if ($request->request->get('js')) { - $list = $this->entityManager->getListController('view')->render(); + $list = $this->entityManager->getList('view')->render(); $response = new AjaxResponse(); $response->addCommand(new ReplaceCommand('#views-entity-list', drupal_render($list))); return $response; diff --git a/core/modules/views_ui/lib/Drupal/views_ui/ViewListController.php b/core/modules/views_ui/lib/Drupal/views_ui/ViewList.php similarity index 96% rename from core/modules/views_ui/lib/Drupal/views_ui/ViewListController.php rename to core/modules/views_ui/lib/Drupal/views_ui/ViewList.php index 0c38908..d347b8b 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/ViewListController.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/ViewList.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\views_ui\ViewListController. + * Contains \Drupal\views_ui\ViewList. */ namespace Drupal\views_ui; @@ -10,8 +10,7 @@ use Drupal\Component\Utility\String; use Drupal\Component\Plugin\PluginManagerInterface; use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Config\Entity\ConfigEntityListController; -use Drupal\Core\Entity\EntityControllerInterface; +use Drupal\Core\Config\Entity\ConfigEntityList; use Drupal\Core\Entity\EntityStorageControllerInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -19,7 +18,7 @@ /** * Provides a listing of Views. */ -class ViewListController extends ConfigEntityListController implements EntityControllerInterface { +class ViewList extends ConfigEntityList { /** * The views display plugin manager to use. @@ -42,7 +41,7 @@ public static function createInstance(ContainerInterface $container, $entity_typ } /** - * Constructs a new EntityListController object. + * Constructs a new EntityList object. * * @param string $entity_type. * The type of entity to be listed. diff --git a/core/modules/views_ui/tests/Drupal/views_ui/Tests/ViewListControllerTest.php b/core/modules/views_ui/tests/Drupal/views_ui/Tests/ViewListTest.php similarity index 91% rename from core/modules/views_ui/tests/Drupal/views_ui/Tests/ViewListControllerTest.php rename to core/modules/views_ui/tests/Drupal/views_ui/Tests/ViewListTest.php index b30bb34..1fc913d 100644 --- a/core/modules/views_ui/tests/Drupal/views_ui/Tests/ViewListControllerTest.php +++ b/core/modules/views_ui/tests/Drupal/views_ui/Tests/ViewListTest.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\views_ui\Tests\ViewListControllerTest + * Contains \Drupal\views_ui\Tests\ViewListTest */ namespace Drupal\views_ui\Tests; @@ -12,12 +12,12 @@ use Drupal\views\Entity\View; use Drupal\views\ViewExecutableFactory; -class ViewListControllerTest extends UnitTestCase { +class ViewListTest extends UnitTestCase { public static function getInfo() { return array( 'name' => 'Views List Controller Unit Test', - 'description' => 'Unit tests the views list controller', + 'description' => 'Unit tests the views list', 'group' => 'Views UI', ); } @@ -25,7 +25,7 @@ public static function getInfo() { /** * Tests the listing of displays on a views list. * - * @see \Drupal\views_ui\ViewListController::getDisplaysList(). + * @see \Drupal\views_ui\ViewList::getDisplaysList() */ public function testBuildRowEntityList() { $storage_controller = $this->getMockBuilder('Drupal\views\ViewStorageController') @@ -124,9 +124,9 @@ public function testBuildRowEntityList() { ->disableOriginalConstructor() ->getMock(); - // Setup a view list controller with a mocked buildOperations method, + // Setup a view list with a mocked buildOperations method, // because t() is called on there. - $view_list_controller = $this->getMock('Drupal\views_ui\ViewListController', array('buildOperations'), array('view', $storage_controller, $entity_info, $display_manager, $module_handler)); + $view_list_controller = $this->getMock('Drupal\views_ui\ViewList', array('buildOperations'), array('view', $storage_controller, $entity_info, $display_manager, $module_handler)); $view_list_controller->expects($this->any()) ->method('buildOperations') ->will($this->returnValue(array())); diff --git a/core/modules/views_ui/views_ui.module b/core/modules/views_ui/views_ui.module index c175caa..b4870f8 100644 --- a/core/modules/views_ui/views_ui.module +++ b/core/modules/views_ui/views_ui.module @@ -40,7 +40,7 @@ function views_ui_menu() { */ function views_ui_entity_info(&$entity_info) { $entity_info['view']['controllers'] += array( - 'list' => 'Drupal\views_ui\ViewListController', + 'list' => 'Drupal\views_ui\ViewList', 'form' => array( 'edit' => 'Drupal\views_ui\ViewEditFormController', 'add' => 'Drupal\views_ui\ViewAddFormController', diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityListControllerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityListTest.php similarity index 76% rename from core/tests/Drupal/Tests/Core/Entity/EntityListControllerTest.php rename to core/tests/Drupal/Tests/Core/Entity/EntityListTest.php index c8b07d6..842663f 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityListControllerTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityListTest.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\Tests\Core\Entity\EntityListControllerTest. + * Contains \Drupal\Tests\Core\Entity\EntityListTest. */ namespace Drupal\Tests\Core\Entity; @@ -10,31 +10,31 @@ use Drupal\Tests\UnitTestCase; /** - * Tests the entity list controller. + * Tests the entity list. * * @group Entity * - * @see \Drupal\entity_test\EntityTestListController + * @see \Drupal\entity_test\EntityTestList */ -class EntityListControllerTest extends UnitTestCase { +class EntityListTest extends UnitTestCase { /** - * The entity used to construct the EntityListController. + * The entity used to construct the EntityList. * * @var \Drupal\user\Entity\Role */ protected $role; /** - * The EntityListController object to test. + * The EntityList object to test. * - * @var \Drupal\Core\Entity\EntityListController + * @var \Drupal\Core\Entity\EntityList */ protected $entityListController; public static function getInfo() { return array( - 'name' => 'Entity list controller test', + 'name' => 'Entity list test', 'description' => 'Unit test of entity access checking system.', 'group' => 'Entity' ); @@ -78,7 +78,7 @@ protected function setUp() { ->disableOriginalConstructor() ->getMock(); - $this->entityListController = $this->getMock('Drupal\entity_test\EntityTestListController', array('buildOperations'), array('user_role', static::$entityInfo, $role_storage_controller, $module_handler)); + $this->entityListController = $this->getMock('Drupal\entity_test\EntityTestList', array('buildOperations'), array('user_role', static::$entityInfo, $role_storage_controller, $module_handler)); $this->entityListController->expects($this->any()) ->method('buildOperations') @@ -132,13 +132,13 @@ public function testBuildRow($input, $expected, $message, $ignorewarnings = FALS public function providerTestBuildRow() { $tests = array(); // Checks that invalid multi-byte sequences are rejected. - $tests[] = array("Foo\xC0barbaz", '', 'EntityTestListController::buildRow() rejects invalid sequence "Foo\xC0barbaz"', TRUE); - $tests[] = array("\xc2\"", '', 'EntityTestListController::buildRow() rejects invalid sequence "\xc2\""', TRUE); - $tests[] = array("Fooÿñ", "Fooÿñ", 'EntityTestListController::buildRow() accepts valid sequence "Fooÿñ"'); + $tests[] = array("Foo\xC0barbaz", '', 'EntityTestList::buildRow() rejects invalid sequence "Foo\xC0barbaz"', TRUE); + $tests[] = array("\xc2\"", '', 'EntityTestList::buildRow() rejects invalid sequence "\xc2\""', TRUE); + $tests[] = array("Fooÿñ", "Fooÿñ", 'EntityTestList::buildRow() accepts valid sequence "Fooÿñ"'); // Checks that special characters are escaped. - $tests[] = array("