diff --git a/core/lib/Drupal/Core/Entity/ContentEntityConfirmFormBase.php b/core/lib/Drupal/Core/Entity/ContentEntityConfirmFormBase.php index a1768c68d1a..a174e315c72 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityConfirmFormBase.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityConfirmFormBase.php @@ -13,7 +13,7 @@ use Drupal\Core\Form\ConfirmFormInterface; /** * Provides a generic base class for an entity-based confirmation form. */ -abstract class ContentEntityConfirmFormBase extends ContentEntityFormController implements ConfirmFormInterface { +abstract class ContentEntityConfirmFormBase extends ContentEntityForm implements ConfirmFormInterface { /** * {@inheritdoc} diff --git a/core/lib/Drupal/Core/Entity/ContentEntityFormController.php b/core/lib/Drupal/Core/Entity/ContentEntityForm.php similarity index 92% rename from core/lib/Drupal/Core/Entity/ContentEntityFormController.php rename to core/lib/Drupal/Core/Entity/ContentEntityForm.php index 568d5cb54c7..8722a9ce113 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityFormController.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityForm.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\Core\Entity\ContentEntityFormController. + * Contains \Drupal\Core\Entity\ContentEntityForm. */ namespace Drupal\Core\Entity; @@ -12,11 +12,11 @@ use Drupal\entity\Entity\EntityFormDisplay; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Entity form controller variant for content entity types. + * Entity form variant for content entity types. * * @see \Drupal\Core\ContentEntityBase */ -class ContentEntityFormController extends EntityFormController implements ContentEntityFormControllerInterface { +class ContentEntityForm extends EntityForm implements ContentEntityFormInterface { /** * The entity manager. @@ -26,7 +26,7 @@ class ContentEntityFormController extends EntityFormController implements Conten protected $entityManager; /** - * Constructs a ContentEntityFormController object. + * Constructs a ContentEntityForm object. * * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager. diff --git a/core/lib/Drupal/Core/Entity/ContentEntityFormControllerInterface.php b/core/lib/Drupal/Core/Entity/ContentEntityFormInterface.php similarity index 79% rename from core/lib/Drupal/Core/Entity/ContentEntityFormControllerInterface.php rename to core/lib/Drupal/Core/Entity/ContentEntityFormInterface.php index 77235d9df54..c0063060984 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityFormControllerInterface.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityFormInterface.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\Core\Entity\ContentEntityFormControllerInterface. + * Contains \Drupal\Core\Entity\ContentEntityFormInterface. */ namespace Drupal\Core\Entity; @@ -10,9 +10,9 @@ namespace Drupal\Core\Entity; use Drupal\Core\Entity\Display\EntityFormDisplayInterface; /** - * Defines a common interface for content entity form controller classes. + * Defines a common interface for content entity form classes. */ -interface ContentEntityFormControllerInterface extends EntityFormControllerInterface { +interface ContentEntityFormInterface extends EntityFormInterface { /** * Returns the form display. diff --git a/core/lib/Drupal/Core/Entity/EntityConfirmFormBase.php b/core/lib/Drupal/Core/Entity/EntityConfirmFormBase.php index bc45b6ba7c6..564fa88f3df 100644 --- a/core/lib/Drupal/Core/Entity/EntityConfirmFormBase.php +++ b/core/lib/Drupal/Core/Entity/EntityConfirmFormBase.php @@ -14,7 +14,7 @@ use Symfony\Component\HttpFoundation\Request; /** * Provides a generic base class for an entity-based confirmation form. */ -abstract class EntityConfirmFormBase extends EntityFormController implements ConfirmFormInterface { +abstract class EntityConfirmFormBase extends EntityForm implements ConfirmFormInterface { /** * {@inheritdoc} diff --git a/core/lib/Drupal/Core/Entity/EntityFormController.php b/core/lib/Drupal/Core/Entity/EntityForm.php similarity index 97% rename from core/lib/Drupal/Core/Entity/EntityFormController.php rename to core/lib/Drupal/Core/Entity/EntityForm.php index b177a2a8533..c80daa42586 100644 --- a/core/lib/Drupal/Core/Entity/EntityFormController.php +++ b/core/lib/Drupal/Core/Entity/EntityForm.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\Core\Entity\EntityFormController. + * Contains \Drupal\Core\Entity\EntityForm. */ namespace Drupal\Core\Entity; @@ -12,9 +12,9 @@ use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Render\Element; /** - * Base class for entity form controllers. + * Base class for entity forms. */ -class EntityFormController extends FormBase implements EntityFormControllerInterface { +class EntityForm extends FormBase implements EntityFormInterface { /** * The name of the current operation. @@ -129,7 +129,7 @@ class EntityFormController extends FormBase implements EntityFormControllerInter /** * Returns the actual form array to be built. * - * @see \Drupal\Core\Entity\EntityFormController::build() + * @see \Drupal\Core\Entity\EntityForm::build() */ public function form(array $form, array &$form_state) { $entity = $this->entity; @@ -152,7 +152,7 @@ class EntityFormController extends FormBase implements EntityFormControllerInter /** * Process callback: assigns weights and hides extra fields. * - * @see \Drupal\Core\Entity\EntityFormController::form() + * @see \Drupal\Core\Entity\EntityForm::form() */ public function processForm($element, $form_state, $form) { // If the form is cached, process callbacks may not have a valid reference diff --git a/core/lib/Drupal/Core/Entity/EntityFormBuilder.php b/core/lib/Drupal/Core/Entity/EntityFormBuilder.php index a601b8f98d0..3823718d7b1 100644 --- a/core/lib/Drupal/Core/Entity/EntityFormBuilder.php +++ b/core/lib/Drupal/Core/Entity/EntityFormBuilder.php @@ -45,14 +45,14 @@ class EntityFormBuilder implements EntityFormBuilderInterface { * {@inheritdoc} */ public function getForm(EntityInterface $entity, $operation = 'default', array $form_state = array()) { - $controller = $this->entityManager->getFormController($entity->getEntityTypeId(), $operation); - $controller->setEntity($entity); + $form_object = $this->entityManager->getFormObject($entity->getEntityTypeId(), $operation); + $form_object->setEntity($entity); - $form_state['build_info']['callback_object'] = $controller; - $form_state['build_info']['base_form_id'] = $controller->getBaseFormID(); + $form_state['build_info']['callback_object'] = $form_object; + $form_state['build_info']['base_form_id'] = $form_object->getBaseFormID(); $form_state['build_info'] += array('args' => array()); - return $this->formBuilder->buildForm($controller->getFormId(), $form_state); + return $this->formBuilder->buildForm($form_object->getFormId(), $form_state); } } diff --git a/core/lib/Drupal/Core/Entity/EntityFormControllerInterface.php b/core/lib/Drupal/Core/Entity/EntityFormInterface.php similarity index 90% rename from core/lib/Drupal/Core/Entity/EntityFormControllerInterface.php rename to core/lib/Drupal/Core/Entity/EntityFormInterface.php index 5e0881ddb93..aae4c5f9aaa 100644 --- a/core/lib/Drupal/Core/Entity/EntityFormControllerInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityFormInterface.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\Core\Entity\EntityFormControllerInterface. + * Contains \Drupal\Core\Entity\EntityFormInterface. */ namespace Drupal\Core\Entity; @@ -12,9 +12,9 @@ use Drupal\Core\Form\BaseFormIdInterface; use Drupal\Core\StringTranslation\TranslationInterface; /** - * Defines a common interface for entity form controller classes. + * Defines a common interface for entity form classes. */ -interface EntityFormControllerInterface extends BaseFormIdInterface { +interface EntityFormInterface extends BaseFormIdInterface { /** * Returns the code identifying the active form language. @@ -49,7 +49,7 @@ interface EntityFormControllerInterface extends BaseFormIdInterface { public function setOperation($operation); /** - * Returns the operation identifying the form controller. + * Returns the operation identifying the form. * * @return string * The name of the operation. @@ -74,7 +74,7 @@ interface EntityFormControllerInterface extends BaseFormIdInterface { * * Sets the form entity which will be used for populating form element * defaults. Usually, the form entity gets updated by - * \Drupal\Core\Entity\EntityFormControllerInterface::submit(), however this may + * \Drupal\Core\Entity\EntityFormInterface::submit(), however this may * be used to completely exchange the form entity, e.g. when preparing the * rebuild of a multi-step form. * @@ -92,7 +92,7 @@ interface EntityFormControllerInterface extends BaseFormIdInterface { * the submitted form values are copied to entity properties. The form's * entity remains unchanged. * - * @see \Drupal\Core\Entity\EntityFormControllerInterface::getEntity() + * @see \Drupal\Core\Entity\EntityFormInterface::getEntity() * * @param array $form * A nested array form elements comprising the form. diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php index 00bb0b0ef64..7385ae3ce14 100644 --- a/core/lib/Drupal/Core/Entity/EntityManager.php +++ b/core/lib/Drupal/Core/Entity/EntityManager.php @@ -217,7 +217,7 @@ class EntityManager extends PluginManagerBase implements EntityManagerInterface, /** * {@inheritdoc} */ - public function getFormController($entity_type, $operation) { + public function getFormObject($entity_type, $operation) { if (!isset($this->controllers['form'][$operation][$entity_type])) { if (!$class = $this->getDefinition($entity_type, TRUE)->getFormClass($operation)) { throw new InvalidPluginDefinitionException($entity_type, sprintf('The "%s" entity type did not specify a "%s" form class.', $entity_type, $operation)); diff --git a/core/lib/Drupal/Core/Entity/EntityManagerInterface.php b/core/lib/Drupal/Core/Entity/EntityManagerInterface.php index da36a3627ff..7ee02553609 100644 --- a/core/lib/Drupal/Core/Entity/EntityManagerInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityManagerInterface.php @@ -150,17 +150,17 @@ interface EntityManagerInterface extends PluginManagerInterface { public function getListBuilder($entity_type); /** - * Creates a new form controller instance. + * Creates a new form instance. * * @param string $entity_type - * The entity type for this form controller. + * The entity type for this form. * @param string $operation * The name of the operation to use, e.g., 'default'. * - * @return \Drupal\Core\Entity\EntityFormControllerInterface - * A form controller instance. + * @return \Drupal\Core\Entity\EntityFormInterface + * A form instance. */ - public function getFormController($entity_type, $operation); + public function getFormObject($entity_type, $operation); /** * Clears static and persistent field definition caches. diff --git a/core/lib/Drupal/Core/Entity/EntityTypeInterface.php b/core/lib/Drupal/Core/Entity/EntityTypeInterface.php index b7b9d0d33a4..7706a58c6a9 100644 --- a/core/lib/Drupal/Core/Entity/EntityTypeInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityTypeInterface.php @@ -202,7 +202,7 @@ interface EntityTypeInterface { * operations. The name of the operation is passed also to the form * controller's constructor, so that one class can be used for multiple * entity forms when the forms are similar. The classes must implement - * \Drupal\Core\Entity\EntityFormControllerInterface. + * \Drupal\Core\Entity\EntityFormInterface. * - list: The name of the class that provides listings of the entities. The * class must implement \Drupal\Core\Entity\EntityListBuilderInterface. * - render: The name of the class that is used to render the entities. The @@ -251,7 +251,7 @@ interface EntityTypeInterface { * The operation to use this form class for. * @param string $class * The form class implementing - * \Drupal\Core\Entity\EntityFormControllerInterface. + * \Drupal\Core\Entity\EntityFormInterface. * * @return static * diff --git a/core/lib/Drupal/Core/Entity/HtmlEntityFormController.php b/core/lib/Drupal/Core/Entity/HtmlEntityFormController.php index 1efb1735b97..e575e659789 100644 --- a/core/lib/Drupal/Core/Entity/HtmlEntityFormController.php +++ b/core/lib/Drupal/Core/Entity/HtmlEntityFormController.php @@ -53,8 +53,8 @@ class HtmlEntityFormController extends FormController { * defaults: * _entity_form: 'node.edit' * @endcode - * This means that the edit form controller for the node entity will used. - * If the entity type has a default form controller, only the name of the + * This means that the edit form for the node entity will used. + * If the entity type has a default form, only the name of the * entity {param} needs to be passed: * @code * path: '/foo/{node}/baz' @@ -74,7 +74,7 @@ class HtmlEntityFormController extends FormController { $entity = $this->manager->getStorage($entity_type)->create(array()); } - return $this->manager->getFormController($entity_type, $operation)->setEntity($entity); + return $this->manager->getFormObject($entity_type, $operation)->setEntity($entity); } } diff --git a/core/lib/Drupal/Core/Form/FormBuilderInterface.php b/core/lib/Drupal/Core/Form/FormBuilderInterface.php index aa34f3f24ed..e7823d3ad1a 100644 --- a/core/lib/Drupal/Core/Form/FormBuilderInterface.php +++ b/core/lib/Drupal/Core/Form/FormBuilderInterface.php @@ -195,7 +195,7 @@ interface FormBuilderInterface extends FormErrorInterface { * storage. The recommended way to ensure that the chosen key doesn't * conflict with ones used by the Form API or other modules is to use the * module name as the key name or a prefix for the key name. For example, - * the entity form controller classes use $this->entity in entity forms, + * the entity form classes use $this->entity in entity forms, * or $form_state['controller']->getEntity() outside the controller, to * store information about the entity being edited, and this information * stays available across successive clicks of the "Preview" button (if diff --git a/core/modules/action/action.module b/core/modules/action/action.module index 3712b14175b..85ccee9b61c 100644 --- a/core/modules/action/action.module +++ b/core/modules/action/action.module @@ -50,8 +50,8 @@ function action_permission() { function action_entity_type_build(array &$entity_types) { /** @var $entity_types \Drupal\Core\Entity\EntityTypeInterface[] */ $entity_types['action'] - ->setFormClass('add', 'Drupal\action\ActionAddFormController') - ->setFormClass('edit', 'Drupal\action\ActionEditFormController') + ->setFormClass('add', 'Drupal\action\ActionAddForm') + ->setFormClass('edit', 'Drupal\action\ActionEditForm') ->setFormClass('delete', 'Drupal\action\Form\ActionDeleteForm') ->setListBuilderClass('Drupal\action\ActionListBuilder') ->setLinkTemplate('delete-form', 'action.delete') diff --git a/core/modules/action/lib/Drupal/action/ActionAddFormController.php b/core/modules/action/lib/Drupal/action/ActionAddForm.php similarity index 89% rename from core/modules/action/lib/Drupal/action/ActionAddFormController.php rename to core/modules/action/lib/Drupal/action/ActionAddForm.php index db024157e77..bae8dcbf7dc 100644 --- a/core/modules/action/lib/Drupal/action/ActionAddFormController.php +++ b/core/modules/action/lib/Drupal/action/ActionAddForm.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\action\ActionAddFormController. + * Contains \Drupal\action\ActionAddForm. */ namespace Drupal\action; @@ -13,9 +13,9 @@ use Drupal\Core\Entity\EntityStorageInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Provides a form controller for action add forms. + * Provides a form for action add forms. */ -class ActionAddFormController extends ActionFormControllerBase { +class ActionAddForm extends ActionFormBase { /** * The action manager. @@ -25,7 +25,7 @@ class ActionAddFormController extends ActionFormControllerBase { protected $actionManager; /** - * Constructs a new ActionAddFormController. + * Constructs a new ActionAddForm. * * @param \Drupal\Core\Entity\EntityStorageInterface $storage * The action storage. diff --git a/core/modules/action/lib/Drupal/action/ActionEditForm.php b/core/modules/action/lib/Drupal/action/ActionEditForm.php new file mode 100644 index 00000000000..d8d9bb29cdf --- /dev/null +++ b/core/modules/action/lib/Drupal/action/ActionEditForm.php @@ -0,0 +1,15 @@ +entity; 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 1ca53f272d0..71913b7ba60 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 @@ -25,10 +25,10 @@ use Drupal\custom_block\CustomBlockInterface; * "list_builder" = "Drupal\custom_block\CustomBlockListBuilder", * "view_builder" = "Drupal\custom_block\CustomBlockViewBuilder", * "form" = { - * "add" = "Drupal\custom_block\CustomBlockFormController", - * "edit" = "Drupal\custom_block\CustomBlockFormController", + * "add" = "Drupal\custom_block\CustomBlockForm", + * "edit" = "Drupal\custom_block\CustomBlockForm", * "delete" = "Drupal\custom_block\Form\CustomBlockDeleteForm", - * "default" = "Drupal\custom_block\CustomBlockFormController" + * "default" = "Drupal\custom_block\CustomBlockForm" * }, * "translation" = "Drupal\custom_block\CustomBlockTranslationHandler" * }, 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 de4a109bfa3..a7674d095c4 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 @@ -19,9 +19,9 @@ use Drupal\custom_block\CustomBlockTypeInterface; * label = @Translation("Custom block type"), * controllers = { * "form" = { - * "default" = "Drupal\custom_block\CustomBlockTypeFormController", - * "add" = "Drupal\custom_block\CustomBlockTypeFormController", - * "edit" = "Drupal\custom_block\CustomBlockTypeFormController", + * "default" = "Drupal\custom_block\CustomBlockTypeForm", + * "add" = "Drupal\custom_block\CustomBlockTypeForm", + * "edit" = "Drupal\custom_block\CustomBlockTypeForm", * "delete" = "Drupal\custom_block\Form\CustomBlockTypeDeleteForm" * }, * "list_builder" = "Drupal\custom_block\CustomBlockTypeListBuilder" diff --git a/core/modules/block/lib/Drupal/block/BlockFormController.php b/core/modules/block/lib/Drupal/block/BlockForm.php similarity index 98% rename from core/modules/block/lib/Drupal/block/BlockFormController.php rename to core/modules/block/lib/Drupal/block/BlockForm.php index 4b4c859d1c5..350fde65a60 100644 --- a/core/modules/block/lib/Drupal/block/BlockFormController.php +++ b/core/modules/block/lib/Drupal/block/BlockForm.php @@ -2,14 +2,14 @@ /** * @file - * Contains \Drupal\block\BlockFormController. + * Contains \Drupal\block\BlockForm. */ namespace Drupal\block; use Drupal\Core\Cache\Cache; use Drupal\Core\Config\ConfigFactoryInterface; -use Drupal\Core\Entity\EntityFormController; +use Drupal\Core\Entity\EntityForm; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Language\Language; use Drupal\Core\Language\LanguageManagerInterface; @@ -17,9 +17,9 @@ use Drupal\language\ConfigurableLanguageManagerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Provides form controller for block instance forms. + * Provides form for block instance forms. */ -class BlockFormController extends EntityFormController { +class BlockForm extends EntityForm { /** * The block entity. @@ -50,7 +50,7 @@ class BlockFormController extends EntityFormController { protected $configFactory; /** - * Constructs a BlockFormController object. + * Constructs a BlockForm object. * * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager. diff --git a/core/modules/block/lib/Drupal/block/Entity/Block.php b/core/modules/block/lib/Drupal/block/Entity/Block.php index f1111fed118..decd0b17a04 100644 --- a/core/modules/block/lib/Drupal/block/Entity/Block.php +++ b/core/modules/block/lib/Drupal/block/Entity/Block.php @@ -26,7 +26,7 @@ use Drupal\Core\Entity\EntityStorageInterface; * "view_builder" = "Drupal\block\BlockViewBuilder", * "list_builder" = "Drupal\block\BlockListBuilder", * "form" = { - * "default" = "Drupal\block\BlockFormController", + * "default" = "Drupal\block\BlockForm", * "delete" = "Drupal\block\Form\BlockDeleteForm" * } * }, diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockUiTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockUiTest.php index 356d480fe6e..bbcc0614de6 100644 --- a/core/modules/block/lib/Drupal/block/Tests/BlockUiTest.php +++ b/core/modules/block/lib/Drupal/block/Tests/BlockUiTest.php @@ -158,7 +158,7 @@ class BlockUiTest extends WebTestBase { } /** - * Tests that the BlockFormController populates machine name correctly. + * Tests that the BlockForm populates machine name correctly. */ public function testMachineNameSuggestion() { $url = 'admin/structure/block/add/test_block_instantiation/stark'; diff --git a/core/modules/block/tests/Drupal/block/Tests/BlockFormControllerTest.php b/core/modules/block/tests/Drupal/block/Tests/BlockFormTest.php similarity index 83% rename from core/modules/block/tests/Drupal/block/Tests/BlockFormControllerTest.php rename to core/modules/block/tests/Drupal/block/Tests/BlockFormTest.php index 760060bba89..698baa25c70 100644 --- a/core/modules/block/tests/Drupal/block/Tests/BlockFormControllerTest.php +++ b/core/modules/block/tests/Drupal/block/Tests/BlockFormTest.php @@ -2,25 +2,25 @@ /** * @file - * Contains \Drupal\block\Tests\BlockFormControllerTest. + * Contains \Drupal\block\Tests\BlockFormTest. */ namespace Drupal\block\Tests; -use Drupal\block\BlockFormController; +use Drupal\block\BlockForm; use Drupal\Tests\UnitTestCase; /** - * Tests the block form controller. + * Tests the block form. * - * @see \Drupal\block\BlockFormController + * @see \Drupal\block\BlockForm */ -class BlockFormControllerTest extends UnitTestCase { +class BlockFormTest extends UnitTestCase { public static function getInfo() { return array( - 'name' => 'Block form controller', - 'description' => 'Tests the block form controller.', + 'name' => 'Block form', + 'description' => 'Tests the block form.', 'group' => 'Block', ); } @@ -28,7 +28,7 @@ class BlockFormControllerTest extends UnitTestCase { /** * Tests the unique machine name generator. * - * @see \Drupal\block\BlockFormController::getUniqueMachineName() + * @see \Drupal\block\BlockForm::getUniqueMachineName() */ public function testGetUniqueMachineName() { $blocks = array(); @@ -62,7 +62,7 @@ class BlockFormControllerTest extends UnitTestCase { $config_factory = $this->getMock('Drupal\Core\Config\ConfigFactoryInterface'); - $block_form_controller = new BlockFormController($entity_manager, $language_manager, $config_factory); + $block_form_controller = new BlockForm($entity_manager, $language_manager, $config_factory); // Ensure that the block with just one other instance gets the next available // name suggestion. diff --git a/core/modules/book/lib/Drupal/book/Form/BookOutlineForm.php b/core/modules/book/lib/Drupal/book/Form/BookOutlineForm.php index ab210d4fe54..f4a97a18538 100644 --- a/core/modules/book/lib/Drupal/book/Form/BookOutlineForm.php +++ b/core/modules/book/lib/Drupal/book/Form/BookOutlineForm.php @@ -8,14 +8,14 @@ namespace Drupal\book\Form; use Drupal\book\BookManagerInterface; -use Drupal\Core\Entity\ContentEntityFormController; +use Drupal\Core\Entity\ContentEntityForm; use Drupal\Core\Entity\EntityManagerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Displays the book outline form. */ -class BookOutlineForm extends ContentEntityFormController { +class BookOutlineForm extends ContentEntityForm { /** * The book being displayed. diff --git a/core/modules/book/lib/Drupal/book/Form/BookRemoveForm.php b/core/modules/book/lib/Drupal/book/Form/BookRemoveForm.php index 5ff18b59f35..45afbdd2379 100644 --- a/core/modules/book/lib/Drupal/book/Form/BookRemoveForm.php +++ b/core/modules/book/lib/Drupal/book/Form/BookRemoveForm.php @@ -13,7 +13,7 @@ use Drupal\node\NodeInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Temporary form controller for book module. + * Remove form for book module. */ class BookRemoveForm extends ConfirmFormBase { diff --git a/core/modules/comment/lib/Drupal/comment/CommentFormController.php b/core/modules/comment/lib/Drupal/comment/CommentForm.php similarity index 96% rename from core/modules/comment/lib/Drupal/comment/CommentFormController.php rename to core/modules/comment/lib/Drupal/comment/CommentForm.php index e9759eb2030..ad0de74f5d3 100644 --- a/core/modules/comment/lib/Drupal/comment/CommentFormController.php +++ b/core/modules/comment/lib/Drupal/comment/CommentForm.php @@ -2,7 +2,7 @@ /** * @file - * Definition of Drupal\comment\CommentFormController. + * Definition of Drupal\comment\CommentForm. */ namespace Drupal\comment; @@ -12,7 +12,7 @@ use Drupal\Component\Utility\String; use Drupal\Component\Utility\Unicode; use Drupal\Core\Cache\Cache; use Drupal\Core\Datetime\DrupalDateTime; -use Drupal\Core\Entity\ContentEntityFormController; +use Drupal\Core\Entity\ContentEntityForm; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Language\Language; use Drupal\Core\Session\AccountInterface; @@ -22,7 +22,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; /** * Base for controller for comment forms. */ -class CommentFormController extends ContentEntityFormController { +class CommentForm extends ContentEntityForm { /** * The field info service. @@ -50,7 +50,7 @@ class CommentFormController extends ContentEntityFormController { } /** - * Constructs a new CommentFormController. + * Constructs a new CommentForm. * * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager service. @@ -82,7 +82,7 @@ class CommentFormController extends ContentEntityFormController { } /** - * Overrides Drupal\Core\Entity\EntityFormController::form(). + * Overrides Drupal\Core\Entity\EntityForm::form(). */ public function form(array $form, array &$form_state) { /** @var \Drupal\comment\CommentInterface $comment */ @@ -234,7 +234,7 @@ class CommentFormController extends ContentEntityFormController { } /** - * Overrides Drupal\Core\Entity\EntityFormController::actions(). + * Overrides Drupal\Core\Entity\EntityForm::actions(). */ protected function actions(array $form, array &$form_state) { $element = parent::actions($form, $form_state); @@ -271,7 +271,7 @@ class CommentFormController extends ContentEntityFormController { } /** - * Overrides Drupal\Core\Entity\EntityFormController::validate(). + * Overrides Drupal\Core\Entity\EntityForm::validate(). */ public function validate(array $form, array &$form_state) { parent::validate($form, $form_state); @@ -304,7 +304,7 @@ class CommentFormController extends ContentEntityFormController { } /** - * Overrides EntityFormController::buildEntity(). + * Overrides EntityForm::buildEntity(). */ public function buildEntity(array $form, array &$form_state) { $comment = parent::buildEntity($form, $form_state); @@ -319,7 +319,7 @@ class CommentFormController extends ContentEntityFormController { } /** - * Overrides Drupal\Core\Entity\EntityFormController::submit(). + * Overrides Drupal\Core\Entity\EntityForm::submit(). */ public function submit(array $form, array &$form_state) { /** @var \Drupal\comment\CommentInterface $comment */ @@ -373,7 +373,7 @@ class CommentFormController extends ContentEntityFormController { } /** - * Overrides Drupal\Core\Entity\EntityFormController::save(). + * Overrides Drupal\Core\Entity\EntityForm::save(). */ public function save(array $form, array &$form_state) { $entity = entity_load($form_state['values']['entity_type'], $form_state['values']['entity_id']); diff --git a/core/modules/comment/lib/Drupal/comment/Entity/Comment.php b/core/modules/comment/lib/Drupal/comment/Entity/Comment.php index eb09d5ce400..de103469219 100644 --- a/core/modules/comment/lib/Drupal/comment/Entity/Comment.php +++ b/core/modules/comment/lib/Drupal/comment/Entity/Comment.php @@ -29,7 +29,7 @@ use Drupal\user\UserInterface; * "access" = "Drupal\comment\CommentAccessController", * "view_builder" = "Drupal\comment\CommentViewBuilder", * "form" = { - * "default" = "Drupal\comment\CommentFormController", + * "default" = "Drupal\comment\CommentForm", * "delete" = "Drupal\comment\Form\DeleteForm" * }, * "translation" = "Drupal\comment\CommentTranslationHandler" diff --git a/core/modules/config/tests/config_test/lib/Drupal/config_test/ConfigTestFormController.php b/core/modules/config/tests/config_test/lib/Drupal/config_test/ConfigTestForm.php similarity index 86% rename from core/modules/config/tests/config_test/lib/Drupal/config_test/ConfigTestFormController.php rename to core/modules/config/tests/config_test/lib/Drupal/config_test/ConfigTestForm.php index 18dcee665ec..6fcc00c20fe 100644 --- a/core/modules/config/tests/config_test/lib/Drupal/config_test/ConfigTestFormController.php +++ b/core/modules/config/tests/config_test/lib/Drupal/config_test/ConfigTestForm.php @@ -2,20 +2,20 @@ /** * @file - * Contains Drupal\config_test\ConfigTestFormController. + * Contains Drupal\config_test\ConfigTestForm. */ namespace Drupal\config_test; -use Drupal\Core\Entity\EntityFormController; +use Drupal\Core\Entity\EntityForm; /** * Form controller for the test config edit forms. */ -class ConfigTestFormController extends EntityFormController { +class ConfigTestForm extends EntityForm { /** - * Overrides Drupal\Core\Entity\EntityFormController::form(). + * Overrides Drupal\Core\Entity\EntityForm::form(). */ public function form(array $form, array &$form_state) { $form = parent::form($form, $form_state); @@ -66,7 +66,7 @@ class ConfigTestFormController extends EntityFormController { } /** - * Overrides Drupal\Core\Entity\EntityFormController::save(). + * Overrides Drupal\Core\Entity\EntityForm::save(). */ public function save(array $form, array &$form_state) { $entity = $this->entity; 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 ef760ddea2d..c314fc6136d 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 @@ -17,7 +17,7 @@ namespace Drupal\config_test\Entity; * "storage" = "Drupal\config_test\ConfigTestStorage", * "list_builder" = "Drupal\Core\Config\Entity\ConfigEntityListBuilder", * "form" = { - * "default" = "Drupal\config_test\ConfigTestFormController" + * "default" = "Drupal\config_test\ConfigTestForm" * } * }, * config_prefix = "query", 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 1f44f4f4415..07ec50a125f 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 @@ -22,7 +22,7 @@ use Drupal\Core\Entity\EntityStorageInterface; * "storage" = "Drupal\config_test\ConfigTestStorage", * "list_builder" = "Drupal\config_test\ConfigTestListBuilder", * "form" = { - * "default" = "Drupal\config_test\ConfigTestFormController", + * "default" = "Drupal\config_test\ConfigTestForm", * "delete" = "Drupal\config_test\Form\ConfigTestDeleteForm" * }, * "access" = "Drupal\config_test\ConfigTestAccessController" diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationAddForm.php b/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationAddForm.php index 34b940562b3..9556be26d81 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationAddForm.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationAddForm.php @@ -10,7 +10,7 @@ namespace Drupal\config_translation\Form; use Symfony\Component\HttpFoundation\Request; /** - * Defines a form controller for adding configuration translations. + * Defines a form for adding configuration translations. */ class ConfigTranslationAddForm extends ConfigTranslationFormBase { diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationEditForm.php b/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationEditForm.php index a87720c0750..565d07aee29 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationEditForm.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationEditForm.php @@ -10,7 +10,7 @@ namespace Drupal\config_translation\Form; use Symfony\Component\HttpFoundation\Request; /** - * Defines a form controller for editing configuration translations. + * Defines a form for editing configuration translations. */ class ConfigTranslationEditForm extends ConfigTranslationFormBase { diff --git a/core/modules/contact/contact.module b/core/modules/contact/contact.module index 5a165560dfd..a8037ee88a6 100644 --- a/core/modules/contact/contact.module +++ b/core/modules/contact/contact.module @@ -198,7 +198,7 @@ function contact_mail($key, &$message, $params) { * * Add the enable personal contact form to an individual user's account page. * - * @see \Drupal\user\ProfileFormController::form() + * @see \Drupal\user\ProfileForm::form() */ function contact_form_user_form_alter(&$form, &$form_state) { $form['contact'] = array( diff --git a/core/modules/contact/lib/Drupal/contact/CategoryFormController.php b/core/modules/contact/lib/Drupal/contact/CategoryForm.php similarity index 91% rename from core/modules/contact/lib/Drupal/contact/CategoryFormController.php rename to core/modules/contact/lib/Drupal/contact/CategoryForm.php index 26d4d4c0538..a810b1e576e 100644 --- a/core/modules/contact/lib/Drupal/contact/CategoryFormController.php +++ b/core/modules/contact/lib/Drupal/contact/CategoryForm.php @@ -2,21 +2,21 @@ /** * @file - * Definition of Drupal\contact\CategoryFormController. + * Definition of Drupal\contact\CategoryForm. */ namespace Drupal\contact; -use Drupal\Core\Entity\EntityFormController; +use Drupal\Core\Entity\EntityForm; use Drupal\Core\Entity\EntityTypeInterface; /** - * Base form controller for category edit forms. + * Base form for category edit forms. */ -class CategoryFormController extends EntityFormController { +class CategoryForm extends EntityForm { /** - * Overrides Drupal\Core\Entity\EntityFormController::form(). + * Overrides Drupal\Core\Entity\EntityForm::form(). */ public function form(array $form, array &$form_state) { $form = parent::form($form, $form_state); @@ -75,7 +75,7 @@ class CategoryFormController extends EntityFormController { } /** - * Overrides Drupal\Core\Entity\EntityFormController::validate(). + * Overrides Drupal\Core\Entity\EntityForm::validate(). */ public function validate(array $form, array &$form_state) { parent::validate($form, $form_state); @@ -93,7 +93,7 @@ class CategoryFormController extends EntityFormController { } /** - * Overrides Drupal\Core\Entity\EntityFormController::save(). + * Overrides Drupal\Core\Entity\EntityForm::save(). */ public function save(array $form, array &$form_state) { $category = $this->entity; diff --git a/core/modules/contact/lib/Drupal/contact/Entity/Category.php b/core/modules/contact/lib/Drupal/contact/Entity/Category.php index 6f0222d8229..0b35cfe5869 100644 --- a/core/modules/contact/lib/Drupal/contact/Entity/Category.php +++ b/core/modules/contact/lib/Drupal/contact/Entity/Category.php @@ -21,8 +21,8 @@ use Drupal\contact\CategoryInterface; * "access" = "Drupal\contact\CategoryAccessController", * "list_builder" = "Drupal\contact\CategoryListBuilder", * "form" = { - * "add" = "Drupal\contact\CategoryFormController", - * "edit" = "Drupal\contact\CategoryFormController", + * "add" = "Drupal\contact\CategoryForm", + * "edit" = "Drupal\contact\CategoryForm", * "delete" = "Drupal\contact\Form\CategoryDeleteForm" * } * }, diff --git a/core/modules/contact/lib/Drupal/contact/Entity/Message.php b/core/modules/contact/lib/Drupal/contact/Entity/Message.php index 68352cbccbf..ea7eaa85cca 100644 --- a/core/modules/contact/lib/Drupal/contact/Entity/Message.php +++ b/core/modules/contact/lib/Drupal/contact/Entity/Message.php @@ -22,7 +22,7 @@ use Drupal\Core\Field\FieldDefinition; * "storage" = "Drupal\Core\Entity\ContentEntityNullStorage", * "view_builder" = "Drupal\contact\MessageViewBuilder", * "form" = { - * "default" = "Drupal\contact\MessageFormController" + * "default" = "Drupal\contact\MessageForm" * } * }, * entity_keys = { diff --git a/core/modules/contact/lib/Drupal/contact/MessageFormController.php b/core/modules/contact/lib/Drupal/contact/MessageForm.php similarity index 95% rename from core/modules/contact/lib/Drupal/contact/MessageFormController.php rename to core/modules/contact/lib/Drupal/contact/MessageForm.php index da178478483..d28a8cb316f 100644 --- a/core/modules/contact/lib/Drupal/contact/MessageFormController.php +++ b/core/modules/contact/lib/Drupal/contact/MessageForm.php @@ -2,14 +2,14 @@ /** * @file - * Definition of Drupal\contact\MessageFormController. + * Definition of Drupal\contact\MessageForm. */ namespace Drupal\contact; use Drupal\Component\Utility\String; use Drupal\Core\Config\ConfigFactoryInterface; -use Drupal\Core\Entity\ContentEntityFormController; +use Drupal\Core\Entity\ContentEntityForm; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Flood\FloodInterface; use Drupal\Core\Language\Language; @@ -19,7 +19,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; /** * Form controller for contact message forms. */ -class MessageFormController extends ContentEntityFormController { +class MessageForm extends ContentEntityForm { /** * The message being used by this form. @@ -43,7 +43,7 @@ class MessageFormController extends ContentEntityFormController { protected $flood; /** - * Constructs a MessageFormController object. + * Constructs a MessageForm object. * * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The factory for configuration objects. @@ -71,7 +71,7 @@ class MessageFormController extends ContentEntityFormController { } /** - * Overrides Drupal\Core\Entity\EntityFormController::form(). + * Overrides Drupal\Core\Entity\EntityForm::form(). */ public function form(array $form, array &$form_state) { $user = \Drupal::currentUser(); @@ -153,7 +153,7 @@ class MessageFormController extends ContentEntityFormController { } /** - * Overrides Drupal\Core\Entity\EntityFormController::actions(). + * Overrides Drupal\Core\Entity\EntityForm::actions(). */ public function actions(array $form, array &$form_state) { $elements = parent::actions($form, $form_state); @@ -182,7 +182,7 @@ class MessageFormController extends ContentEntityFormController { } /** - * Overrides Drupal\Core\Entity\EntityFormController::save(). + * Overrides Drupal\Core\Entity\EntityForm::save(). */ public function save(array $form, array &$form_state) { $user = \Drupal::currentUser(); diff --git a/core/modules/content_translation/content_translation.module b/core/modules/content_translation/content_translation.module index 38b5b412214..1f174eb956f 100644 --- a/core/modules/content_translation/content_translation.module +++ b/core/modules/content_translation/content_translation.module @@ -7,7 +7,7 @@ use Drupal\content_translation\Plugin\Derivative\ContentTranslationLocalTasks; use Drupal\Core\Entity\ContentEntityInterface; -use Drupal\Core\Entity\EntityFormControllerInterface; +use Drupal\Core\Entity\EntityFormInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\FieldDefinition; @@ -360,19 +360,19 @@ function content_translation_controller($entity_type_id) { } /** - * Returns the entity form controller for the given form. + * Returns the entity form for the given form. * * @param array $form_state - * The form state array holding the entity form controller. + * The form state array holding the entity form. * - * @return \Drupal\Core\Entity\EntityFormControllerInterface; + * @return \Drupal\Core\Entity\EntityFormInterface; * An instance of the content translation form interface or FALSE if not an * entity form. * * @todo Move to \Drupal\content_translation\ContentTranslationManager. */ function content_translation_form_controller(array $form_state) { - return isset($form_state['controller']) && $form_state['controller'] instanceof EntityFormControllerInterface ? $form_state['controller'] : FALSE; + return isset($form_state['controller']) && $form_state['controller'] instanceof EntityFormInterface ? $form_state['controller'] : FALSE; } /** diff --git a/core/modules/content_translation/lib/Drupal/content_translation/Form/ContentTranslationDeleteForm.php b/core/modules/content_translation/lib/Drupal/content_translation/Form/ContentTranslationDeleteForm.php index 07acc16dc34..92a544d95ad 100644 --- a/core/modules/content_translation/lib/Drupal/content_translation/Form/ContentTranslationDeleteForm.php +++ b/core/modules/content_translation/lib/Drupal/content_translation/Form/ContentTranslationDeleteForm.php @@ -10,7 +10,7 @@ namespace Drupal\content_translation\Form; use Drupal\Core\Form\ConfirmFormBase; /** - * Temporary form controller for content_translation module. + * Delete translation form for content_translation module. */ class ContentTranslationDeleteForm extends ConfirmFormBase { diff --git a/core/modules/entity/lib/Drupal/entity/EntityFormModeListBuilder.php b/core/modules/entity/lib/Drupal/entity/EntityFormModeListBuilder.php index 7c556abfea5..8fcd2a08bee 100644 --- a/core/modules/entity/lib/Drupal/entity/EntityFormModeListBuilder.php +++ b/core/modules/entity/lib/Drupal/entity/EntityFormModeListBuilder.php @@ -21,7 +21,7 @@ class EntityFormModeListBuilder extends EntityDisplayModeListBuilder { * The entity type of the entity that needs to be validated. * * @return bool - * TRUE if the entity has any form controllers, FALSE otherwise. + * TRUE if the entity has any forms, FALSE otherwise. */ protected function isValidEntity($entity_type) { return $this->entityTypes[$entity_type]->hasFormClasses(); diff --git a/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeFormBase.php b/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeFormBase.php index 4247502f21c..8c462f98b65 100644 --- a/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeFormBase.php +++ b/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeFormBase.php @@ -7,7 +7,7 @@ namespace Drupal\entity\Form; -use Drupal\Core\Entity\EntityFormController; +use Drupal\Core\Entity\EntityForm; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Entity\Query\QueryFactory; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -15,7 +15,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; /** * Provides the generic base class for entity display mode forms. */ -abstract class EntityDisplayModeFormBase extends EntityFormController { +abstract class EntityDisplayModeFormBase extends EntityForm { /** * The entity query factory. diff --git a/core/modules/entity/lib/Drupal/entity/Tests/EntityDisplayModeTest.php b/core/modules/entity/lib/Drupal/entity/Tests/EntityDisplayModeTest.php index 177d4dfe1d6..16c55f568f7 100644 --- a/core/modules/entity/lib/Drupal/entity/Tests/EntityDisplayModeTest.php +++ b/core/modules/entity/lib/Drupal/entity/Tests/EntityDisplayModeTest.php @@ -92,7 +92,7 @@ class EntityDisplayModeTest extends WebTestBase { $this->assertResponse(404); $this->drupalGet('admin/structure/display-modes/form/add'); - $this->assertNoLink(t('Entity Test without label'), 'An entity type with no form controller cannot have form modes.'); + $this->assertNoLink(t('Entity Test without label'), 'An entity type with no form cannot have form modes.'); // Test adding a view mode including dots in machine_name. $this->clickLink(t('Test entity')); diff --git a/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php b/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php index bd8f0f90af3..ff6954f83f0 100644 --- a/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php +++ b/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php @@ -22,12 +22,12 @@ use Drupal\filter\Plugin\FilterInterface; * label = @Translation("Text format"), * controllers = { * "form" = { - * "add" = "Drupal\filter\FilterFormatAddFormController", - * "edit" = "Drupal\filter\FilterFormatEditFormController", + * "add" = "Drupal\filter\FilterFormatAddForm", + * "edit" = "Drupal\filter\FilterFormatEditForm", * "disable" = "Drupal\filter\Form\FilterDisableForm" * }, * "list_builder" = "Drupal\filter\FilterFormatListBuilder", - * "access" = "Drupal\filter\FilterFormatAccessController", + * "access" = "Drupal\filter\FilterFormatAccess", * }, * config_prefix = "format", * admin_permission = "administer filters", diff --git a/core/modules/filter/lib/Drupal/filter/FilterFormatAccessController.php b/core/modules/filter/lib/Drupal/filter/FilterFormatAccess.php similarity index 90% rename from core/modules/filter/lib/Drupal/filter/FilterFormatAccessController.php rename to core/modules/filter/lib/Drupal/filter/FilterFormatAccess.php index f8d2660cb60..b6f6f587bbd 100644 --- a/core/modules/filter/lib/Drupal/filter/FilterFormatAccessController.php +++ b/core/modules/filter/lib/Drupal/filter/FilterFormatAccess.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\filter\FilterFormatAccessController. + * Contains \Drupal\filter\FilterFormatAccess. */ namespace Drupal\filter; @@ -14,7 +14,7 @@ use Drupal\Core\Session\AccountInterface; /** * Defines the access controller for the filter format entity type. */ -class FilterFormatAccessController extends EntityAccessController { +class FilterFormatAccess extends EntityAccessController { /** * {@inheritdoc} diff --git a/core/modules/filter/lib/Drupal/filter/FilterFormatAddFormController.php b/core/modules/filter/lib/Drupal/filter/FilterFormatAddForm.php similarity index 70% rename from core/modules/filter/lib/Drupal/filter/FilterFormatAddFormController.php rename to core/modules/filter/lib/Drupal/filter/FilterFormatAddForm.php index 7c78a8ba6fe..b8814f4b993 100644 --- a/core/modules/filter/lib/Drupal/filter/FilterFormatAddFormController.php +++ b/core/modules/filter/lib/Drupal/filter/FilterFormatAddForm.php @@ -2,15 +2,15 @@ /** * @file - * Contains \Drupal\filter\FilterFormatAddFormController. + * Contains \Drupal\filter\FilterFormatAddForm. */ namespace Drupal\filter; /** - * Provides a form controller for adding a filter format. + * Provides a form for adding a filter format. */ -class FilterFormatAddFormController extends FilterFormatFormControllerBase { +class FilterFormatAddForm extends FilterFormatFormBase { /** * {@inheritdoc} diff --git a/core/modules/filter/lib/Drupal/filter/FilterFormatEditFormController.php b/core/modules/filter/lib/Drupal/filter/FilterFormatEditForm.php similarity index 80% rename from core/modules/filter/lib/Drupal/filter/FilterFormatEditFormController.php rename to core/modules/filter/lib/Drupal/filter/FilterFormatEditForm.php index e39ffeac392..42cdc649d68 100644 --- a/core/modules/filter/lib/Drupal/filter/FilterFormatEditFormController.php +++ b/core/modules/filter/lib/Drupal/filter/FilterFormatEditForm.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\filter\FilterFormatEditFormController. + * Contains \Drupal\filter\FilterFormatEditForm. */ namespace Drupal\filter; @@ -10,9 +10,9 @@ namespace Drupal\filter; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** - * Provides a form controller for adding a filter format. + * Provides a form for adding a filter format. */ -class FilterFormatEditFormController extends FilterFormatFormControllerBase { +class FilterFormatEditForm extends FilterFormatFormBase { /** * {@inheritdoc} diff --git a/core/modules/filter/lib/Drupal/filter/FilterFormatFormControllerBase.php b/core/modules/filter/lib/Drupal/filter/FilterFormatFormBase.php similarity index 96% rename from core/modules/filter/lib/Drupal/filter/FilterFormatFormControllerBase.php rename to core/modules/filter/lib/Drupal/filter/FilterFormatFormBase.php index 2c778a55822..2f986ff7592 100644 --- a/core/modules/filter/lib/Drupal/filter/FilterFormatFormControllerBase.php +++ b/core/modules/filter/lib/Drupal/filter/FilterFormatFormBase.php @@ -2,21 +2,21 @@ /** * @file - * Contains \Drupal\filter\FilterFormatFormControllerBase. + * Contains \Drupal\filter\FilterFormatFormBase. */ namespace Drupal\filter; use Drupal\Core\Config\ConfigFactoryInterface; -use Drupal\Core\Entity\EntityFormController; +use Drupal\Core\Entity\EntityForm; use Drupal\Core\Entity\Query\QueryFactory; use Drupal\filter\Plugin\Filter\FilterNull; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Provides a base form controller for a filter format. + * Provides a base form for a filter format. */ -abstract class FilterFormatFormControllerBase extends EntityFormController { +abstract class FilterFormatFormBase extends EntityForm { /** * The config factory. @@ -33,7 +33,7 @@ abstract class FilterFormatFormControllerBase extends EntityFormController { protected $queryFactory; /** - * Constructs a new FilterFormatFormControllerBase. + * Constructs a new FilterFormatFormBase. * * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module index 5facc3c8553..551b92b4824 100644 --- a/core/modules/forum/forum.module +++ b/core/modules/forum/forum.module @@ -158,10 +158,10 @@ function forum_menu_local_tasks(&$data, $route_name) { */ function forum_entity_type_build(array &$entity_types) { /** @var $entity_types \Drupal\Core\Entity\EntityTypeInterface[] */ - // Register forum specific form controllers. + // Register forum specific forms. $entity_types['taxonomy_term'] - ->setFormClass('forum', 'Drupal\forum\Form\ForumFormController') - ->setFormClass('container', 'Drupal\forum\Form\ContainerFormController') + ->setFormClass('forum', 'Drupal\forum\Form\ForumForm') + ->setFormClass('container', 'Drupal\forum\Form\ContainerForm') ->setLinkTemplate('forum-delete-form', 'forum.delete') ->setLinkTemplate('forum-edit-form', 'forum.edit_forum'); } diff --git a/core/modules/forum/lib/Drupal/forum/Form/ContainerFormController.php b/core/modules/forum/lib/Drupal/forum/Form/ContainerForm.php similarity index 87% rename from core/modules/forum/lib/Drupal/forum/Form/ContainerFormController.php rename to core/modules/forum/lib/Drupal/forum/Form/ContainerForm.php index 40f81998843..1918bd080e1 100644 --- a/core/modules/forum/lib/Drupal/forum/Form/ContainerFormController.php +++ b/core/modules/forum/lib/Drupal/forum/Form/ContainerForm.php @@ -2,15 +2,15 @@ /** * @file - * Contains \Drupal\forum\Form\ContainerFormController. + * Contains \Drupal\forum\Form\ContainerForm. */ namespace Drupal\forum\Form; /** - * Base form controller for container term edit forms. + * Base form for container term edit forms. */ -class ContainerFormController extends ForumFormController { +class ContainerForm extends ForumForm { /** * Reusable url stub to use in watchdog messages. diff --git a/core/modules/forum/lib/Drupal/forum/Form/ForumFormController.php b/core/modules/forum/lib/Drupal/forum/Form/ForumForm.php similarity index 96% rename from core/modules/forum/lib/Drupal/forum/Form/ForumFormController.php rename to core/modules/forum/lib/Drupal/forum/Form/ForumForm.php index 9ac2e881466..2a4c69abf36 100644 --- a/core/modules/forum/lib/Drupal/forum/Form/ForumFormController.php +++ b/core/modules/forum/lib/Drupal/forum/Form/ForumForm.php @@ -2,18 +2,18 @@ /** * @file - * Contains \Drupal\forum\Form\ForumFormController. + * Contains \Drupal\forum\Form\ForumForm. */ namespace Drupal\forum\Form; use Drupal\Core\Cache\Cache; -use Drupal\taxonomy\TermFormController; +use Drupal\taxonomy\TermForm; /** - * Base form controller for forum term edit forms. + * Base form for forum term edit forms. */ -class ForumFormController extends TermFormController { +class ForumForm extends TermForm { /** * Reusable type field to use in status messages. diff --git a/core/modules/image/lib/Drupal/image/Form/ImageStyleFormBase.php b/core/modules/image/lib/Drupal/image/Form/ImageStyleFormBase.php index 1547ca7743f..d1c89502ef6 100644 --- a/core/modules/image/lib/Drupal/image/Form/ImageStyleFormBase.php +++ b/core/modules/image/lib/Drupal/image/Form/ImageStyleFormBase.php @@ -7,14 +7,14 @@ namespace Drupal\image\Form; -use Drupal\Core\Entity\EntityFormController; +use Drupal\Core\Entity\EntityForm; use Drupal\Core\Entity\EntityStorageInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Base form controller for image style add and edit forms. + * Base form for image style add and edit forms. */ -abstract class ImageStyleFormBase extends EntityFormController { +abstract class ImageStyleFormBase extends EntityForm { /** * The image style entity storage. diff --git a/core/modules/language/lib/Drupal/language/Form/LanguageFormBase.php b/core/modules/language/lib/Drupal/language/Form/LanguageFormBase.php index 33d5fa1edce..ef5795b1e50 100644 --- a/core/modules/language/lib/Drupal/language/Form/LanguageFormBase.php +++ b/core/modules/language/lib/Drupal/language/Form/LanguageFormBase.php @@ -8,13 +8,13 @@ namespace Drupal\language\Form; use Drupal\Component\Utility\String; -use Drupal\Core\Entity\EntityFormController; +use Drupal\Core\Entity\EntityForm; use Drupal\Core\Language\Language; /** - * Base form controller for language add and edit forms. + * Base form for language add and edit forms. */ -abstract class LanguageFormBase extends EntityFormController { +abstract class LanguageFormBase extends EntityForm { /** * Common elements of the language addition and editing form. diff --git a/core/modules/menu_link/lib/Drupal/menu_link/Entity/MenuLink.php b/core/modules/menu_link/lib/Drupal/menu_link/Entity/MenuLink.php index e979dbbde8e..d6d4436848b 100644 --- a/core/modules/menu_link/lib/Drupal/menu_link/Entity/MenuLink.php +++ b/core/modules/menu_link/lib/Drupal/menu_link/Entity/MenuLink.php @@ -25,7 +25,7 @@ use Symfony\Component\Routing\Route; * "storage" = "Drupal\menu_link\MenuLinkStorage", * "access" = "Drupal\menu_link\MenuLinkAccessController", * "form" = { - * "default" = "Drupal\menu_link\MenuLinkFormController" + * "default" = "Drupal\menu_link\MenuLinkForm" * } * }, * admin_permission = "administer menu", diff --git a/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkFormController.php b/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkForm.php similarity index 95% rename from core/modules/menu_link/lib/Drupal/menu_link/MenuLinkFormController.php rename to core/modules/menu_link/lib/Drupal/menu_link/MenuLinkForm.php index 5c50cbee07c..422906fccbf 100644 --- a/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkFormController.php +++ b/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkForm.php @@ -2,23 +2,22 @@ /** * @file - * Contains \Drupal\menu_link\MenuLinkFormController. + * Contains \Drupal\menu_link\MenuLinkForm. */ namespace Drupal\menu_link; use Drupal\Component\Utility\UrlHelper; -use Drupal\Core\Entity\EntityFormController; +use Drupal\Core\Entity\EntityForm; use Drupal\Core\Language\Language; use Drupal\Core\Path\AliasManagerInterface; use Drupal\Core\Routing\UrlGenerator; -use Drupal\menu_link\MenuLinkStorageInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Form controller for the node edit forms. */ -class MenuLinkFormController extends EntityFormController { +class MenuLinkForm extends EntityForm { /** * The menu link storage. @@ -42,7 +41,7 @@ class MenuLinkFormController extends EntityFormController { protected $urlGenerator; /** - * Constructs a new MenuLinkFormController object. + * Constructs a new MenuLinkForm object. * * @param \Drupal\menu_link\MenuLinkStorageInterface $menu_link_storage * The menu link storage. @@ -69,7 +68,7 @@ class MenuLinkFormController extends EntityFormController { } /** - * Overrides EntityFormController::form(). + * Overrides EntityForm::form(). */ public function form(array $form, array &$form_state) { $menu_link = $this->entity; @@ -191,7 +190,7 @@ class MenuLinkFormController extends EntityFormController { } /** - * Overrides EntityFormController::actions(). + * Overrides EntityForm::actions(). */ protected function actions(array $form, array &$form_state) { $element = parent::actions($form, $form_state); @@ -202,7 +201,7 @@ class MenuLinkFormController extends EntityFormController { } /** - * Overrides EntityFormController::validate(). + * Overrides EntityForm::validate(). */ public function validate(array $form, array &$form_state) { $menu_link = $this->buildEntity($form, $form_state); @@ -271,7 +270,7 @@ class MenuLinkFormController extends EntityFormController { } /** - * Overrides EntityFormController::submit(). + * Overrides EntityForm::submit(). */ public function submit(array $form, array &$form_state) { // Build the menu link object from the submitted values. @@ -289,7 +288,7 @@ class MenuLinkFormController extends EntityFormController { } /** - * Overrides EntityFormController::save(). + * Overrides EntityForm::save(). */ public function save(array $form, array &$form_state) { $menu_link = $this->entity; diff --git a/core/modules/menu_ui/lib/Drupal/menu_ui/MenuFormController.php b/core/modules/menu_ui/lib/Drupal/menu_ui/MenuForm.php similarity index 98% rename from core/modules/menu_ui/lib/Drupal/menu_ui/MenuFormController.php rename to core/modules/menu_ui/lib/Drupal/menu_ui/MenuForm.php index 1b34afa81e1..aa8a51a8a48 100644 --- a/core/modules/menu_ui/lib/Drupal/menu_ui/MenuFormController.php +++ b/core/modules/menu_ui/lib/Drupal/menu_ui/MenuForm.php @@ -2,13 +2,13 @@ /** * @file - * Contains \Drupal\menu_ui\MenuFormController. + * Contains \Drupal\menu_ui\MenuForm. */ namespace Drupal\menu_ui; use Drupal\Component\Utility\NestedArray; -use Drupal\Core\Entity\EntityFormController; +use Drupal\Core\Entity\EntityForm; use Drupal\Core\Entity\Query\QueryFactory; use Drupal\Core\Language\Language; use Drupal\Core\Render\Element; @@ -17,9 +17,9 @@ use Drupal\menu_link\MenuTreeInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Base form controller for menu edit forms. + * Base form for menu edit forms. */ -class MenuFormController extends EntityFormController { +class MenuForm extends EntityForm { /** * The factory for entity queries. @@ -50,7 +50,7 @@ class MenuFormController extends EntityFormController { protected $overviewTreeForm = array('#tree' => TRUE); /** - * Constructs a MenuFormController object. + * Constructs a MenuForm object. * * @param \Drupal\Core\Entity\Query\QueryFactory $entity_query_factory * The factory for entity queries. @@ -77,7 +77,7 @@ class MenuFormController extends EntityFormController { } /** - * Overrides Drupal\Core\Entity\EntityFormController::form(). + * {@inheritdoc} */ public function form(array $form, array &$form_state) { $menu = $this->entity; diff --git a/core/modules/menu_ui/menu_ui.module b/core/modules/menu_ui/menu_ui.module index 932c0bbb302..a74b5ced0d7 100644 --- a/core/modules/menu_ui/menu_ui.module +++ b/core/modules/menu_ui/menu_ui.module @@ -70,8 +70,8 @@ function menu_ui_permission() { function menu_ui_entity_type_build(array &$entity_types) { /** @var $entity_types \Drupal\Core\Entity\EntityTypeInterface[] */ $entity_types['menu'] - ->setFormClass('add', 'Drupal\menu_ui\MenuFormController') - ->setFormClass('edit', 'Drupal\menu_ui\MenuFormController') + ->setFormClass('add', 'Drupal\menu_ui\MenuForm') + ->setFormClass('edit', 'Drupal\menu_ui\MenuForm') ->setFormClass('delete', 'Drupal\menu_ui\Form\MenuDeleteForm') ->setListBuilderClass('Drupal\menu_ui\MenuListBuilder') ->setLinkTemplate('add-form', 'menu_ui.link_add') @@ -585,7 +585,7 @@ function menu_ui_node_submit(EntityInterface $node, $form, $form_state) { * * Adds menu options to the node type form. * - * @see NodeTypeFormController::form(). + * @see NodeTypeForm::form(). * @see menu_ui_form_node_type_form_submit(). */ function menu_ui_form_node_type_form_alter(&$form, $form_state) { diff --git a/core/modules/node/lib/Drupal/node/Entity/Node.php b/core/modules/node/lib/Drupal/node/Entity/Node.php index 3e803a0fcbc..1fc6f033ec8 100644 --- a/core/modules/node/lib/Drupal/node/Entity/Node.php +++ b/core/modules/node/lib/Drupal/node/Entity/Node.php @@ -27,9 +27,9 @@ use Drupal\user\UserInterface; * "view_builder" = "Drupal\node\NodeViewBuilder", * "access" = "Drupal\node\NodeAccessController", * "form" = { - * "default" = "Drupal\node\NodeFormController", + * "default" = "Drupal\node\NodeForm", * "delete" = "Drupal\node\Form\NodeDeleteForm", - * "edit" = "Drupal\node\NodeFormController" + * "edit" = "Drupal\node\NodeForm" * }, * "list_builder" = "Drupal\node\NodeListBuilder", * "translation" = "Drupal\node\NodeTranslationHandler" diff --git a/core/modules/node/lib/Drupal/node/Entity/NodeType.php b/core/modules/node/lib/Drupal/node/Entity/NodeType.php index fde17a295fa..1c3a83969c6 100644 --- a/core/modules/node/lib/Drupal/node/Entity/NodeType.php +++ b/core/modules/node/lib/Drupal/node/Entity/NodeType.php @@ -21,8 +21,8 @@ use Drupal\node\NodeTypeInterface; * controllers = { * "access" = "Drupal\node\NodeTypeAccessController", * "form" = { - * "add" = "Drupal\node\NodeTypeFormController", - * "edit" = "Drupal\node\NodeTypeFormController", + * "add" = "Drupal\node\NodeTypeForm", + * "edit" = "Drupal\node\NodeTypeForm", * "delete" = "Drupal\node\Form\NodeTypeDeleteConfirm" * }, * "list_builder" = "Drupal\node\NodeTypeListBuilder", diff --git a/core/modules/node/lib/Drupal/node/NodeFormController.php b/core/modules/node/lib/Drupal/node/NodeForm.php similarity index 97% rename from core/modules/node/lib/Drupal/node/NodeFormController.php rename to core/modules/node/lib/Drupal/node/NodeForm.php index 8524580c03c..37bb7da74ab 100644 --- a/core/modules/node/lib/Drupal/node/NodeFormController.php +++ b/core/modules/node/lib/Drupal/node/NodeForm.php @@ -2,7 +2,7 @@ /** * @file - * Definition of Drupal\node\NodeFormController. + * Definition of Drupal\node\NodeForm. */ namespace Drupal\node; @@ -10,14 +10,14 @@ namespace Drupal\node; use Drupal\Component\Utility\NestedArray; use Drupal\Core\Cache\Cache; use Drupal\Core\Datetime\DrupalDateTime; -use Drupal\Core\Entity\ContentEntityFormController; +use Drupal\Core\Entity\ContentEntityForm; use Drupal\Core\Language\Language; use Drupal\Component\Utility\String; /** * Form controller for the node edit forms. */ -class NodeFormController extends ContentEntityFormController { +class NodeForm extends ContentEntityForm { /** * Default settings for this content/node type. @@ -53,7 +53,7 @@ class NodeFormController extends ContentEntityFormController { } /** - * Overrides Drupal\Core\Entity\EntityFormController::form(). + * Overrides Drupal\Core\Entity\EntityForm::form(). */ public function form(array $form, array &$form_state) { /** @var \Drupal\node\NodeInterface $node */ @@ -218,7 +218,7 @@ class NodeFormController extends ContentEntityFormController { } /** - * Overrides Drupal\Core\Entity\EntityFormController::actions(). + * Overrides Drupal\Core\Entity\EntityForm::actions(). */ protected function actions(array $form, array &$form_state) { $element = parent::actions($form, $form_state); @@ -299,7 +299,7 @@ class NodeFormController extends ContentEntityFormController { } /** - * Overrides Drupal\Core\Entity\EntityFormController::validate(). + * Overrides Drupal\Core\Entity\EntityForm::validate(). */ public function validate(array $form, array &$form_state) { $node = $this->buildEntity($form, $form_state); @@ -341,7 +341,7 @@ class NodeFormController extends ContentEntityFormController { * form state's entity with the current step's values before proceeding to the * next step. * - * Overrides Drupal\Core\Entity\EntityFormController::submit(). + * Overrides Drupal\Core\Entity\EntityForm::submit(). */ public function submit(array $form, array &$form_state) { // Build the node object from the submitted values. @@ -437,7 +437,7 @@ class NodeFormController extends ContentEntityFormController { /** - * Overrides Drupal\Core\Entity\EntityFormController::save(). + * Overrides Drupal\Core\Entity\EntityForm::save(). */ public function save(array $form, array &$form_state) { $node = $this->entity; diff --git a/core/modules/node/lib/Drupal/node/NodeTypeFormController.php b/core/modules/node/lib/Drupal/node/NodeTypeForm.php similarity index 97% rename from core/modules/node/lib/Drupal/node/NodeTypeFormController.php rename to core/modules/node/lib/Drupal/node/NodeTypeForm.php index dd794c85908..0875c8046f9 100644 --- a/core/modules/node/lib/Drupal/node/NodeTypeFormController.php +++ b/core/modules/node/lib/Drupal/node/NodeTypeForm.php @@ -2,19 +2,19 @@ /** * @file - * Contains \Drupal\node\NodeTypeFormController. + * Contains \Drupal\node\NodeTypeForm. */ namespace Drupal\node; -use Drupal\Core\Entity\EntityFormController; +use Drupal\Core\Entity\EntityForm; use Drupal\Component\Utility\String; use Drupal\Core\Entity\EntityTypeInterface; /** * Form controller for node type forms. */ -class NodeTypeFormController extends EntityFormController { +class NodeTypeForm extends EntityForm { /** * {@inheritdoc} diff --git a/core/modules/node/lib/Drupal/node/NodeTypeListBuilder.php b/core/modules/node/lib/Drupal/node/NodeTypeListBuilder.php index 45bac5766f4..779672a110c 100644 --- a/core/modules/node/lib/Drupal/node/NodeTypeListBuilder.php +++ b/core/modules/node/lib/Drupal/node/NodeTypeListBuilder.php @@ -31,7 +31,7 @@ class NodeTypeListBuilder extends ConfigEntityListBuilder { protected $urlGenerator; /** - * Constructs a NodeTypeFormController object. + * Constructs a NodeTypeForm object. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type definition. diff --git a/core/modules/node/node.api.php b/core/modules/node/node.api.php index 3f603c201e7..2004013f177 100644 --- a/core/modules/node/node.api.php +++ b/core/modules/node/node.api.php @@ -592,7 +592,7 @@ function hook_node_access(\Drupal\node\NodeInterface $node, $op, $account, $lang /** * Act on a node object about to be shown on the add/edit form. * - * This hook is invoked from NodeFormController::prepareEntity(). + * This hook is invoked from NodeForm::prepareEntity(). * * @param \Drupal\node\NodeInterface $node * The node that is about to be shown on the form. @@ -711,7 +711,7 @@ function hook_node_update_index(\Drupal\node\NodeInterface $node, $langcode) { /** * Perform node validation before a node is created or updated. * - * This hook is invoked from NodeFormController::validate(), after a user has + * This hook is invoked from NodeForm::validate(), after a user has * finished editing the node and is previewing or submitting it. It is invoked * at the end of all the standard validation steps. * diff --git a/core/modules/node/node.pages.inc b/core/modules/node/node.pages.inc index 94f29bcdb68..efc88fbaaa5 100644 --- a/core/modules/node/node.pages.inc +++ b/core/modules/node/node.pages.inc @@ -77,7 +77,7 @@ function node_preview(NodeInterface $node, array &$form_state) { * An associative array containing: * - node: The node entity which is being previewed. * - * @see NodeFormController::preview() + * @see NodeForm::preview() * @see node_preview() */ function template_preprocess_node_preview(&$variables) { diff --git a/core/modules/responsive_image/lib/Drupal/responsive_image/Entity/ResponsiveImageMapping.php b/core/modules/responsive_image/lib/Drupal/responsive_image/Entity/ResponsiveImageMapping.php index 82e7ed00557..734fca1065b 100644 --- a/core/modules/responsive_image/lib/Drupal/responsive_image/Entity/ResponsiveImageMapping.php +++ b/core/modules/responsive_image/lib/Drupal/responsive_image/Entity/ResponsiveImageMapping.php @@ -19,10 +19,10 @@ use Drupal\responsive_image\ResponsiveImageMappingInterface; * controllers = { * "list_builder" = "Drupal\responsive_image\ResponsiveImageMappingListBuilder", * "form" = { - * "edit" = "Drupal\responsive_image\ResponsiveImageMappingFormController", - * "add" = "Drupal\responsive_image\ResponsiveImageMappingFormController", + * "edit" = "Drupal\responsive_image\ResponsiveImageMappingForm", + * "add" = "Drupal\responsive_image\ResponsiveImageMappingForm", * "delete" = "Drupal\responsive_image\Form\ResponsiveImageMappingDeleteForm", - * "duplicate" = "Drupal\responsive_image\ResponsiveImageMappingFormController" + * "duplicate" = "Drupal\responsive_image\ResponsiveImageMappingForm" * } * }, * list_path = "admin/config/media/responsive-image-mapping", diff --git a/core/modules/responsive_image/lib/Drupal/responsive_image/ResponsiveImageMappingFormController.php b/core/modules/responsive_image/lib/Drupal/responsive_image/ResponsiveImageMappingForm.php similarity index 93% rename from core/modules/responsive_image/lib/Drupal/responsive_image/ResponsiveImageMappingFormController.php rename to core/modules/responsive_image/lib/Drupal/responsive_image/ResponsiveImageMappingForm.php index 721817b8586..1b4bb4a89d7 100644 --- a/core/modules/responsive_image/lib/Drupal/responsive_image/ResponsiveImageMappingFormController.php +++ b/core/modules/responsive_image/lib/Drupal/responsive_image/ResponsiveImageMappingForm.php @@ -2,20 +2,20 @@ /** * @file - * Contains Drupal\responsive_image\ResponsiveImageFormController. + * Contains Drupal\responsive_image\ResponsiveImageForm. */ namespace Drupal\responsive_image; -use Drupal\Core\Entity\EntityFormController; +use Drupal\Core\Entity\EntityForm; /** * Form controller for the responsive image edit/add forms. */ -class ResponsiveImageMappingFormController extends EntityFormController { +class ResponsiveImageMappingForm extends EntityForm { /** - * Overrides Drupal\Core\Entity\EntityFormController::form(). + * Overrides Drupal\Core\Entity\EntityForm::form(). * * @param array $form * A nested array form elements comprising the form. @@ -92,7 +92,7 @@ class ResponsiveImageMappingFormController extends EntityFormController { } /** - * Overrides Drupal\Core\Entity\EntityFormController::validate(). + * {@inheritdoc} */ public function validate(array $form, array &$form_state) { /** @var \Drupal\responsive_image\ResponsiveImageMappingInterface $responsive_image_mapping */ @@ -115,7 +115,7 @@ class ResponsiveImageMappingFormController extends EntityFormController { } /** - * Overrides Drupal\Core\Entity\EntityFormController::save(). + * Overrides Drupal\Core\Entity\EntityForm::save(). */ public function save(array $form, array &$form_state) { /** @var \Drupal\responsive_image\ResponsiveImageMappingInterface $responsive_image_mapping */ diff --git a/core/modules/search/lib/Drupal/search/Form/SearchPageAddForm.php b/core/modules/search/lib/Drupal/search/Form/SearchPageAddForm.php index 79ff6093310..c8f3f68b888 100644 --- a/core/modules/search/lib/Drupal/search/Form/SearchPageAddForm.php +++ b/core/modules/search/lib/Drupal/search/Form/SearchPageAddForm.php @@ -8,7 +8,7 @@ namespace Drupal\search\Form; /** - * Provides a form controller for adding a search page. + * Provides a form for adding a search page. */ class SearchPageAddForm extends SearchPageFormBase { diff --git a/core/modules/search/lib/Drupal/search/Form/SearchPageEditForm.php b/core/modules/search/lib/Drupal/search/Form/SearchPageEditForm.php index de9b1e448ee..dc3de861468 100644 --- a/core/modules/search/lib/Drupal/search/Form/SearchPageEditForm.php +++ b/core/modules/search/lib/Drupal/search/Form/SearchPageEditForm.php @@ -8,7 +8,7 @@ namespace Drupal\search\Form; /** - * Provides a form controller for editing a search page. + * Provides a form for editing a search page. */ class SearchPageEditForm extends SearchPageFormBase { diff --git a/core/modules/search/lib/Drupal/search/Form/SearchPageForm.php b/core/modules/search/lib/Drupal/search/Form/SearchPageForm.php index 6f6e70a2020..1dac382c546 100644 --- a/core/modules/search/lib/Drupal/search/Form/SearchPageForm.php +++ b/core/modules/search/lib/Drupal/search/Form/SearchPageForm.php @@ -7,7 +7,7 @@ namespace Drupal\search\Form; -use Drupal\Core\Entity\EntityFormController; +use Drupal\Core\Entity\EntityForm; /** * Provides a search form for site wide search. @@ -18,7 +18,7 @@ use Drupal\Core\Entity\EntityFormController; * trigger the search being processed by the controller, and adding in any * additional query parameters they need to execute search. */ -class SearchPageForm extends EntityFormController { +class SearchPageForm extends EntityForm { /** * {@inheritdoc} diff --git a/core/modules/search/lib/Drupal/search/Form/SearchPageFormBase.php b/core/modules/search/lib/Drupal/search/Form/SearchPageFormBase.php index 0001554758a..43fed9c6d56 100644 --- a/core/modules/search/lib/Drupal/search/Form/SearchPageFormBase.php +++ b/core/modules/search/lib/Drupal/search/Form/SearchPageFormBase.php @@ -7,16 +7,16 @@ namespace Drupal\search\Form; -use Drupal\Core\Entity\EntityFormController; +use Drupal\Core\Entity\EntityForm; use Drupal\Core\Entity\Query\QueryFactory; use Drupal\Core\Plugin\PluginFormInterface; use Drupal\search\SearchPageRepositoryInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Provides a base form controller for search pages. + * Provides a base form for search pages. */ -abstract class SearchPageFormBase extends EntityFormController { +abstract class SearchPageFormBase extends EntityForm { /** * The entity being used by this form. diff --git a/core/modules/shortcut/src/Entity/Shortcut.php b/core/modules/shortcut/src/Entity/Shortcut.php index 00d0dd3bad7..71a33e43d22 100644 --- a/core/modules/shortcut/src/Entity/Shortcut.php +++ b/core/modules/shortcut/src/Entity/Shortcut.php @@ -23,8 +23,8 @@ use Drupal\shortcut\ShortcutInterface; * controllers = { * "access" = "Drupal\shortcut\ShortcutAccessController", * "form" = { - * "default" = "Drupal\shortcut\ShortcutFormController", - * "add" = "Drupal\shortcut\ShortcutFormController", + * "default" = "Drupal\shortcut\ShortcutForm", + * "add" = "Drupal\shortcut\ShortcutForm", * "delete" = "Drupal\shortcut\Form\ShortcutDeleteForm" * }, * "translation" = "Drupal\content_translation\ContentTranslationHandler" diff --git a/core/modules/shortcut/src/Entity/ShortcutSet.php b/core/modules/shortcut/src/Entity/ShortcutSet.php index f4d5d5973de..f9338d959f4 100644 --- a/core/modules/shortcut/src/Entity/ShortcutSet.php +++ b/core/modules/shortcut/src/Entity/ShortcutSet.php @@ -22,9 +22,9 @@ use Drupal\shortcut\ShortcutSetInterface; * "access" = "Drupal\shortcut\ShortcutSetAccessController", * "list_builder" = "Drupal\shortcut\ShortcutSetListBuilder", * "form" = { - * "default" = "Drupal\shortcut\ShortcutSetFormController", - * "add" = "Drupal\shortcut\ShortcutSetFormController", - * "edit" = "Drupal\shortcut\ShortcutSetFormController", + * "default" = "Drupal\shortcut\ShortcutSetForm", + * "add" = "Drupal\shortcut\ShortcutSetForm", + * "edit" = "Drupal\shortcut\ShortcutSetForm", * "customize" = "Drupal\shortcut\Form\SetCustomize", * "delete" = "Drupal\shortcut\Form\ShortcutSetDeleteForm" * } diff --git a/core/modules/shortcut/src/Form/SetCustomize.php b/core/modules/shortcut/src/Form/SetCustomize.php index 0d427be6058..716f7eae4c8 100644 --- a/core/modules/shortcut/src/Form/SetCustomize.php +++ b/core/modules/shortcut/src/Form/SetCustomize.php @@ -7,7 +7,7 @@ namespace Drupal\shortcut\Form; -use Drupal\Core\Entity\EntityFormController; +use Drupal\Core\Entity\EntityForm; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Render\Element; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -15,7 +15,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; /** * Builds the shortcut set customize form. */ -class SetCustomize extends EntityFormController { +class SetCustomize extends EntityForm { /** * The entity being used by this form. diff --git a/core/modules/shortcut/src/ShortcutFormController.php b/core/modules/shortcut/src/ShortcutForm.php similarity index 90% rename from core/modules/shortcut/src/ShortcutFormController.php rename to core/modules/shortcut/src/ShortcutForm.php index c34f8763d28..0e101ffed58 100644 --- a/core/modules/shortcut/src/ShortcutFormController.php +++ b/core/modules/shortcut/src/ShortcutForm.php @@ -2,18 +2,18 @@ /** * @file - * Contains \Drupal\shortcut\ShortcutFormController. + * Contains \Drupal\shortcut\ShortcutForm. */ namespace Drupal\shortcut; -use Drupal\Core\Entity\ContentEntityFormController; +use Drupal\Core\Entity\ContentEntityForm; use Drupal\Core\Language\Language; /** * Form controller for the shortcut entity forms. */ -class ShortcutFormController extends ContentEntityFormController { +class ShortcutForm extends ContentEntityForm { /** * The entity being used by this form. @@ -48,7 +48,7 @@ class ShortcutFormController extends ContentEntityFormController { } /** - * Overrides EntityFormController::buildEntity(). + * {@inheritdoc} */ public function buildEntity(array $form, array &$form_state) { $entity = parent::buildEntity($form, $form_state); diff --git a/core/modules/shortcut/src/ShortcutSetFormController.php b/core/modules/shortcut/src/ShortcutSetForm.php similarity index 84% rename from core/modules/shortcut/src/ShortcutSetFormController.php rename to core/modules/shortcut/src/ShortcutSetForm.php index 5360b5f9092..c35b72d1c3d 100644 --- a/core/modules/shortcut/src/ShortcutSetFormController.php +++ b/core/modules/shortcut/src/ShortcutSetForm.php @@ -2,20 +2,20 @@ /** * @file - * Contains \Drupal\shortcut\ShortcutSetFormController. + * Contains \Drupal\shortcut\ShortcutSetForm. */ namespace Drupal\shortcut; -use Drupal\Core\Entity\EntityFormController; +use Drupal\Core\Entity\EntityForm; /** * Form controller for the shortcut set entity edit forms. */ -class ShortcutSetFormController extends EntityFormController { +class ShortcutSetForm extends EntityForm { /** - * Overrides \Drupal\Core\Entity\EntityFormController::form(). + * {@inheritdoc} */ public function form(array $form, array &$form_state) { $form = parent::form($form, $form_state); @@ -48,7 +48,7 @@ class ShortcutSetFormController extends EntityFormController { } /** - * Overrides \Drupal\Core\Entity\EntityFormController::actions(). + * {@inheritdoc} */ protected function actions(array $form, array &$form_state) { // Disable delete of default shortcut set. @@ -58,7 +58,7 @@ class ShortcutSetFormController extends EntityFormController { } /** - * Overrides \Drupal\Core\Entity\EntityFormController::validate(). + * {@inheritdoc} */ public function validate(array $form, array &$form_state) { parent::validate($form, $form_state); @@ -70,7 +70,7 @@ class ShortcutSetFormController extends EntityFormController { } /** - * Overrides \Drupal\Core\Entity\EntityFormController::save(). + * {@inheritdoc} */ public function save(array $form, array &$form_state) { $entity = $this->entity; diff --git a/core/modules/system/entity.api.php b/core/modules/system/entity.api.php index c53444bd30a..282e4e3d15c 100644 --- a/core/modules/system/entity.api.php +++ b/core/modules/system/entity.api.php @@ -110,9 +110,9 @@ function hook_ENTITY_TYPE_create_access(\Drupal\Core\Session\AccountInterface $a */ function hook_entity_type_build(array &$entity_types) { /** @var $entity_types \Drupal\Core\Entity\EntityTypeInterface[] */ - // Add a form controller for a custom node form without overriding the default + // Add a form for a custom node form without overriding the default // node form. To override the default node form, use hook_entity_type_alter(). - $entity_types['node']->setFormClass('mymodule_foo', 'Drupal\mymodule\NodeFooFormController'); + $entity_types['node']->setFormClass('mymodule_foo', 'Drupal\mymodule\NodeFooForm'); } /** @@ -627,7 +627,7 @@ function hook_entity_display_build_alter(&$build, $context) { * @param array $form_state * An associative array containing the current state of the form. * - * @see \Drupal\Core\Entity\EntityFormController::prepareEntity() + * @see \Drupal\Core\Entity\EntityForm::prepareEntity() */ function hook_entity_prepare_form(\Drupal\Core\Entity\EntityInterface $entity, $operation, array &$form_state) { if ($operation == 'edit') { diff --git a/core/modules/system/lib/Drupal/system/Form/DateFormatAddForm.php b/core/modules/system/lib/Drupal/system/Form/DateFormatAddForm.php index 8305e52f7b0..b9289a22d93 100644 --- a/core/modules/system/lib/Drupal/system/Form/DateFormatAddForm.php +++ b/core/modules/system/lib/Drupal/system/Form/DateFormatAddForm.php @@ -8,7 +8,7 @@ namespace Drupal\system\Form; /** - * Provides a form controller for adding a date format. + * Provides a form for adding a date format. */ class DateFormatAddForm extends DateFormatFormBase { diff --git a/core/modules/system/lib/Drupal/system/Form/DateFormatEditForm.php b/core/modules/system/lib/Drupal/system/Form/DateFormatEditForm.php index ebf4df8e238..3b25d7ed9f0 100644 --- a/core/modules/system/lib/Drupal/system/Form/DateFormatEditForm.php +++ b/core/modules/system/lib/Drupal/system/Form/DateFormatEditForm.php @@ -8,7 +8,7 @@ namespace Drupal\system\Form; /** - * Provides a form controller for editing a date format. + * Provides a form for editing a date format. */ class DateFormatEditForm extends DateFormatFormBase { diff --git a/core/modules/system/lib/Drupal/system/Form/DateFormatFormBase.php b/core/modules/system/lib/Drupal/system/Form/DateFormatFormBase.php index 8e987bce5c1..3dfb81ef908 100644 --- a/core/modules/system/lib/Drupal/system/Form/DateFormatFormBase.php +++ b/core/modules/system/lib/Drupal/system/Form/DateFormatFormBase.php @@ -14,12 +14,12 @@ use Drupal\Core\Datetime\Date; use Drupal\Core\Language\Language; use Symfony\Component\DependencyInjection\ContainerInterface; use Drupal\Core\Datetime\DrupalDateTime; -use Drupal\Core\Entity\EntityFormController; +use Drupal\Core\Entity\EntityForm; /** - * Provides a base form controller for date formats. + * Provides a base form for date formats. */ -abstract class DateFormatFormBase extends EntityFormController { +abstract class DateFormatFormBase extends EntityForm { /** * The date pattern type. diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityFormTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityFormTest.php index 36a8e12a8da..dabfab44413 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityFormTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityFormTest.php @@ -24,7 +24,7 @@ class EntityFormTest extends WebTestBase { public static function getInfo() { return array( 'name' => 'Entity form', - 'description' => 'Tests the entity form controller.', + 'description' => 'Tests the entity form.', 'group' => 'Entity API', ); } 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 a2e4fed2ced..a2f2d2cbe83 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 @@ -25,8 +25,8 @@ use Drupal\user\UserInterface; * "view_builder" = "Drupal\entity_test\EntityTestViewBuilder", * "access" = "Drupal\entity_test\EntityTestAccessController", * "form" = { - * "default" = "Drupal\entity_test\EntityTestFormController", - * "delete" = "Drupal\entity_test\EntityTestDeleteFormController" + * "default" = "Drupal\entity_test\EntityTestForm", + * "delete" = "Drupal\entity_test\EntityTestDeleteForm" * }, * "translation" = "Drupal\content_translation\ContentTranslationHandler" * }, diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestBaseFieldDisplay.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestBaseFieldDisplay.php index cddccc69f93..6a8badd9f68 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestBaseFieldDisplay.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestBaseFieldDisplay.php @@ -19,7 +19,7 @@ use Drupal\Core\Field\FieldDefinition; * controllers = { * "access" = "Drupal\entity_test\EntityTestAccessController", * "form" = { - * "default" = "Drupal\entity_test\EntityTestFormController" + * "default" = "Drupal\entity_test\EntityTestForm" * }, * "translation" = "Drupal\content_translation\ContentTranslationHandler" * }, diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestCache.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestCache.php index 8480d808594..07d0e7521ae 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestCache.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestCache.php @@ -16,7 +16,7 @@ namespace Drupal\entity_test\Entity; * controllers = { * "access" = "Drupal\entity_test\EntityTestAccessController", * "form" = { - * "default" = "Drupal\entity_test\EntityTestFormController" + * "default" = "Drupal\entity_test\EntityTestForm" * }, * "translation" = "Drupal\content_translation\ContentTranslationHandler" * }, diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestMul.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestMul.php index fa668063232..993026255a1 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestMul.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestMul.php @@ -21,8 +21,8 @@ use Drupal\entity_test\Entity\EntityTest; * "view_builder" = "Drupal\entity_test\EntityTestViewBuilder", * "access" = "Drupal\entity_test\EntityTestAccessController", * "form" = { - * "default" = "Drupal\entity_test\EntityTestFormController", - * "delete" = "Drupal\entity_test\EntityTestDeleteFormController" + * "default" = "Drupal\entity_test\EntityTestForm", + * "delete" = "Drupal\entity_test\EntityTestDeleteForm" * }, * "translation" = "Drupal\content_translation\ContentTranslationHandler" * }, diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestMulRev.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestMulRev.php index a92b47fb49b..21f6c5402f7 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestMulRev.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestMulRev.php @@ -20,8 +20,8 @@ use Drupal\entity_test\Entity\EntityTestRev; * controllers = { * "access" = "Drupal\entity_test\EntityTestAccessController", * "form" = { - * "default" = "Drupal\entity_test\EntityTestFormController", - * "delete" = "Drupal\entity_test\EntityTestDeleteFormController" + * "default" = "Drupal\entity_test\EntityTestForm", + * "delete" = "Drupal\entity_test\EntityTestDeleteForm" * }, * "translation" = "Drupal\content_translation\ContentTranslationHandler" * }, diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestRev.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestRev.php index 886f00a085d..ea99ed0d160 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestRev.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestRev.php @@ -20,8 +20,8 @@ use Drupal\entity_test\Entity\EntityTest; * controllers = { * "access" = "Drupal\entity_test\EntityTestAccessController", * "form" = { - * "default" = "Drupal\entity_test\EntityTestFormController", - * "delete" = "Drupal\entity_test\EntityTestDeleteFormController" + * "default" = "Drupal\entity_test\EntityTestForm", + * "delete" = "Drupal\entity_test\EntityTestDeleteForm" * }, * "translation" = "Drupal\content_translation\ContentTranslationHandler" * }, diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestDeleteFormController.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestDeleteForm.php similarity index 87% rename from core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestDeleteFormController.php rename to core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestDeleteForm.php index 531cdb7a205..5f84846f043 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestDeleteFormController.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestDeleteForm.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\entity_test\EntityTestDeleteFormController. + * Contains \Drupal\entity_test\EntityTestDeleteForm. */ namespace Drupal\entity_test; @@ -12,7 +12,7 @@ use Drupal\Core\Entity\ContentEntityConfirmFormBase; /** * Provides the entity_test delete form. */ -class EntityTestDeleteFormController extends ContentEntityConfirmFormBase { +class EntityTestDeleteForm extends ContentEntityConfirmFormBase { /** * {@inheritdoc} diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestFormController.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestForm.php similarity index 87% rename from core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestFormController.php rename to core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestForm.php index 4c0663deb17..849ea17d11d 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestFormController.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestForm.php @@ -1,21 +1,21 @@ entity; @@ -106,4 +106,5 @@ class EntityTestFormController extends ContentEntityFormController { $form_state['rebuild'] = TRUE; } } + } diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php index 6ac35497511..510524ab315 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php @@ -27,7 +27,7 @@ use Drupal\taxonomy\TermInterface; * "view_builder" = "Drupal\taxonomy\TermViewBuilder", * "access" = "Drupal\taxonomy\TermAccessController", * "form" = { - * "default" = "Drupal\taxonomy\TermFormController", + * "default" = "Drupal\taxonomy\TermForm", * "delete" = "Drupal\taxonomy\Form\TermDeleteForm" * }, * "translation" = "Drupal\taxonomy\TermTranslationHandler" diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Vocabulary.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Vocabulary.php index ec46b6b468f..00ae49c01ef 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Vocabulary.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Vocabulary.php @@ -22,7 +22,7 @@ use Drupal\taxonomy\VocabularyInterface; * "storage" = "Drupal\taxonomy\VocabularyStorage", * "list_builder" = "Drupal\taxonomy\VocabularyListBuilder", * "form" = { - * "default" = "Drupal\taxonomy\VocabularyFormController", + * "default" = "Drupal\taxonomy\VocabularyForm", * "reset" = "Drupal\taxonomy\Form\VocabularyResetForm", * "delete" = "Drupal\taxonomy\Form\VocabularyDeleteForm" * } diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/TermForm.php similarity index 97% rename from core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php rename to core/modules/taxonomy/lib/Drupal/taxonomy/TermForm.php index 9bbfee1e816..8f01c407658 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/TermForm.php @@ -2,14 +2,14 @@ /** * @file - * Definition of Drupal\taxonomy\TermFormController. + * Definition of Drupal\taxonomy\TermForm. */ namespace Drupal\taxonomy; use Drupal\Core\Cache\Cache; use Drupal\Core\Config\ConfigFactoryInterface; -use Drupal\Core\Entity\ContentEntityFormController; +use Drupal\Core\Entity\ContentEntityForm; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Language\Language; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -17,7 +17,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; /** * Base for controller for taxonomy term edit forms. */ -class TermFormController extends ContentEntityFormController { +class TermForm extends ContentEntityForm { /** * The config factory. @@ -27,7 +27,7 @@ class TermFormController extends ContentEntityFormController { protected $configFactory; /** - * Constructs a new TermFormController. + * Constructs a new TermForm. * * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager. diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/TermTranslationHandler.php b/core/modules/taxonomy/lib/Drupal/taxonomy/TermTranslationHandler.php index 63b9318d93b..58cf8646b63 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/TermTranslationHandler.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/TermTranslationHandler.php @@ -28,7 +28,7 @@ class TermTranslationHandler extends ContentTranslationHandler { * * This handles the save action. * - * @see \Drupal\Core\Entity\EntityFormController::build(). + * @see \Drupal\Core\Entity\EntityForm::build(). */ function entityFormSave(array $form, array &$form_state) { if ($this->getSourceLangcode($form_state)) { diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php index ffcf1f2523c..04bbf6cbcdf 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php @@ -307,7 +307,7 @@ class TermTest extends TaxonomyTestBase { 'description[0][value]' => $this->randomName(100), ); // Explicitly set the parents field to 'root', to ensure that - // TermFormController::save() handles the invalid term ID correctly. + // TermForm::save() handles the invalid term ID correctly. $edit['parent[]'] = array(0); // Create the term to edit. diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyForm.php similarity index 96% rename from core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php rename to core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyForm.php index 9b1852abf78..341bcbe0242 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyForm.php @@ -2,19 +2,19 @@ /** * @file - * Contains \Drupal\taxonomy\VocabularyFormController. + * Contains \Drupal\taxonomy\VocabularyForm. */ namespace Drupal\taxonomy; -use Drupal\Core\Entity\EntityFormController; +use Drupal\Core\Entity\EntityForm; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Language\Language; /** - * Base form controller for vocabulary edit forms. + * Base form for vocabulary edit forms. */ -class VocabularyFormController extends EntityFormController { +class VocabularyForm extends EntityForm { /** * {@inheritdoc} diff --git a/core/modules/user/lib/Drupal/user/AccountFormController.php b/core/modules/user/lib/Drupal/user/AccountForm.php similarity index 98% rename from core/modules/user/lib/Drupal/user/AccountFormController.php rename to core/modules/user/lib/Drupal/user/AccountForm.php index ed4cc0739bc..f85fca27904 100644 --- a/core/modules/user/lib/Drupal/user/AccountFormController.php +++ b/core/modules/user/lib/Drupal/user/AccountForm.php @@ -2,12 +2,12 @@ /** * @file - * Contains \Drupal\user\AccountFormController. + * Contains \Drupal\user\AccountForm. */ namespace Drupal\user; -use Drupal\Core\Entity\ContentEntityFormController; +use Drupal\Core\Entity\ContentEntityForm; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Entity\Query\QueryFactory; use Drupal\Core\Language\Language; @@ -20,7 +20,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; /** * Form controller for the user account forms. */ -abstract class AccountFormController extends ContentEntityFormController { +abstract class AccountForm extends ContentEntityForm { /** * The language manager. @@ -37,7 +37,7 @@ abstract class AccountFormController extends ContentEntityFormController { protected $entityQuery; /** - * Constructs a new EntityFormController object. + * Constructs a new EntityForm object. * * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager. diff --git a/core/modules/user/lib/Drupal/user/Entity/Role.php b/core/modules/user/lib/Drupal/user/Entity/Role.php index d9cd07ca38a..b517ac94099 100644 --- a/core/modules/user/lib/Drupal/user/Entity/Role.php +++ b/core/modules/user/lib/Drupal/user/Entity/Role.php @@ -22,7 +22,7 @@ use Drupal\user\RoleInterface; * "access" = "Drupal\user\RoleAccessController", * "list_builder" = "Drupal\user\RoleListBuilder", * "form" = { - * "default" = "Drupal\user\RoleFormController", + * "default" = "Drupal\user\RoleForm", * "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 10dc69cd945..25eb6411a96 100644 --- a/core/modules/user/lib/Drupal/user/Entity/User.php +++ b/core/modules/user/lib/Drupal/user/Entity/User.php @@ -27,9 +27,9 @@ use Drupal\user\UserInterface; * "list_builder" = "Drupal\user\UserListBuilder", * "view_builder" = "Drupal\Core\Entity\EntityViewBuilder", * "form" = { - * "default" = "Drupal\user\ProfileFormController", + * "default" = "Drupal\user\ProfileForm", * "cancel" = "Drupal\user\Form\UserCancelForm", - * "register" = "Drupal\user\RegisterFormController" + * "register" = "Drupal\user\RegisterForm" * }, * "translation" = "Drupal\user\ProfileTranslationHandler" * }, diff --git a/core/modules/user/lib/Drupal/user/Form/UserCancelForm.php b/core/modules/user/lib/Drupal/user/Form/UserCancelForm.php index eb05ee157c7..9f76e1ed57a 100644 --- a/core/modules/user/lib/Drupal/user/Form/UserCancelForm.php +++ b/core/modules/user/lib/Drupal/user/Form/UserCancelForm.php @@ -39,7 +39,7 @@ class UserCancelForm extends ContentEntityConfirmFormBase { protected $entity; /** - * Constructs an EntityFormController object. + * Constructs an EntityForm object. * * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. diff --git a/core/modules/user/lib/Drupal/user/Form/UserMultipleCancelConfirm.php b/core/modules/user/lib/Drupal/user/Form/UserMultipleCancelConfirm.php index 18d69d998e6..8e994760a14 100644 --- a/core/modules/user/lib/Drupal/user/Form/UserMultipleCancelConfirm.php +++ b/core/modules/user/lib/Drupal/user/Form/UserMultipleCancelConfirm.php @@ -199,7 +199,7 @@ class UserMultipleCancelConfirm extends ConfirmFormBase { // The $user global is not a complete user entity, so load the full // entity. $account = $this->userStorage->load($uid); - $admin_form = $this->entityManager->getFormController('user', 'cancel'); + $admin_form = $this->entityManager->getFormObject('user', 'cancel'); $admin_form->setEntity($account); // Calling this directly required to init form object with $account. $admin_form->buildForm($admin_form_mock, $admin_form_state, $this->request); diff --git a/core/modules/user/lib/Drupal/user/ProfileFormController.php b/core/modules/user/lib/Drupal/user/ProfileForm.php similarity index 95% rename from core/modules/user/lib/Drupal/user/ProfileFormController.php rename to core/modules/user/lib/Drupal/user/ProfileForm.php index 325f02ba279..6c52a271b9a 100644 --- a/core/modules/user/lib/Drupal/user/ProfileFormController.php +++ b/core/modules/user/lib/Drupal/user/ProfileForm.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\user\ProfileFormController. + * Contains \Drupal\user\ProfileForm. */ namespace Drupal\user; @@ -15,7 +15,7 @@ use Drupal\Core\Language\LanguageManager; /** * Form controller for the profile forms. */ -class ProfileFormController extends AccountFormController { +class ProfileForm extends AccountForm { /** * {@inheritdoc} diff --git a/core/modules/user/lib/Drupal/user/ProfileTranslationHandler.php b/core/modules/user/lib/Drupal/user/ProfileTranslationHandler.php index 035424b8b90..c332d83500d 100644 --- a/core/modules/user/lib/Drupal/user/ProfileTranslationHandler.php +++ b/core/modules/user/lib/Drupal/user/ProfileTranslationHandler.php @@ -28,7 +28,7 @@ class ProfileTranslationHandler extends ContentTranslationHandler { * * This handles the save action. * - * @see \Drupal\Core\Entity\EntityFormController::build(). + * @see \Drupal\Core\Entity\EntityForm::build(). */ function entityFormSave(array $form, array &$form_state) { if ($this->getSourceLangcode($form_state)) { diff --git a/core/modules/user/lib/Drupal/user/RegisterFormController.php b/core/modules/user/lib/Drupal/user/RegisterForm.php similarity index 93% rename from core/modules/user/lib/Drupal/user/RegisterFormController.php rename to core/modules/user/lib/Drupal/user/RegisterForm.php index dd33b54fcd2..30f3018077d 100644 --- a/core/modules/user/lib/Drupal/user/RegisterFormController.php +++ b/core/modules/user/lib/Drupal/user/RegisterForm.php @@ -2,7 +2,7 @@ /** * @file - * Definition of Drupal\user\RegisterFormController. + * Definition of Drupal\user\RegisterForm. */ namespace Drupal\user; @@ -15,7 +15,7 @@ use Symfony\Component\HttpFoundation\RedirectResponse; /** * Form controller for the user register forms. */ -class RegisterFormController extends AccountFormController { +class RegisterForm extends AccountForm { /** * {@inheritdoc} @@ -25,7 +25,7 @@ class RegisterFormController extends AccountFormController { } /** - * Overrides Drupal\Core\Entity\EntityFormController::form(). + * Overrides Drupal\Core\Entity\EntityForm::form(). */ public function form(array $form, array &$form_state) { $user = $this->currentUser(); @@ -60,7 +60,7 @@ class RegisterFormController extends AccountFormController { } /** - * Overrides Drupal\Core\Entity\EntityFormController::actions(). + * Overrides Drupal\Core\Entity\EntityForm::actions(). */ protected function actions(array $form, array &$form_state) { $element = parent::actions($form, $form_state); @@ -69,7 +69,7 @@ class RegisterFormController extends AccountFormController { } /** - * Overrides Drupal\Core\Entity\EntityFormController::submit(). + * Overrides Drupal\Core\Entity\EntityForm::submit(). */ public function submit(array $form, array &$form_state) { $admin = $form_state['values']['administer_users']; @@ -91,7 +91,7 @@ class RegisterFormController extends AccountFormController { } /** - * Overrides Drupal\Core\Entity\EntityFormController::submit(). + * Overrides Drupal\Core\Entity\EntityForm::submit(). */ public function save(array $form, array &$form_state) { $account = $this->entity; diff --git a/core/modules/user/lib/Drupal/user/RoleFormController.php b/core/modules/user/lib/Drupal/user/RoleForm.php similarity index 94% rename from core/modules/user/lib/Drupal/user/RoleFormController.php rename to core/modules/user/lib/Drupal/user/RoleForm.php index 873214f900b..902fc041d8b 100644 --- a/core/modules/user/lib/Drupal/user/RoleFormController.php +++ b/core/modules/user/lib/Drupal/user/RoleForm.php @@ -2,18 +2,18 @@ /** * @file - * Contains \Drupal\user\RoleFormController. + * Contains \Drupal\user\RoleForm. */ namespace Drupal\user; use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Entity\EntityFormController; +use Drupal\Core\Entity\EntityForm; /** * Form controller for the role entity edit forms. */ -class RoleFormController extends EntityFormController { +class RoleForm extends EntityForm { /** * {@inheritdoc} diff --git a/core/modules/user/user.module b/core/modules/user/user.module index e937d269a07..2418ee70ade 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -527,7 +527,7 @@ function _user_language_selector_langcode_value($element, $input, &$form_state) /** * Form validation handler for the current password on the user account form. * - * @see AccountFormController::form() + * @see AccountForm::form() */ function user_validate_current_pass(&$form, &$form_state) { $account = $form_state['user']; diff --git a/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlockBase.php b/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlockBase.php index 9b9ee45a86b..b0bfdba154d 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlockBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlockBase.php @@ -112,7 +112,7 @@ abstract class ViewsBlockBase extends BlockBase implements ContainerFactoryPlugi $form['label']['#default_value'] = ''; $form['label']['#access'] = FALSE; - // Unset the machine_name provided by BlockFormController. + // Unset the machine_name provided by BlockForm. unset($form['id']['#machine_name']['source']); // Prevent users from changing the auto-generated block machine_name. $form['id']['#access'] = FALSE; diff --git a/core/modules/views/lib/Drupal/views/Tests/Wizard/BasicTest.php b/core/modules/views/lib/Drupal/views/Tests/Wizard/BasicTest.php index be30330d59e..ad207cb8036 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Wizard/BasicTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Wizard/BasicTest.php @@ -144,7 +144,7 @@ class BasicTest extends WizardTestBase { /** * Tests the actual wizard form. * - * @see \Drupal\views_ui\ViewAddFormController::form() + * @see \Drupal\views_ui\ViewAddForm::form() */ protected function testWizardForm() { $this->drupalGet('admin/structure/views/add'); diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Form/Ajax/ViewsFormBase.php b/core/modules/views_ui/lib/Drupal/views_ui/Form/Ajax/ViewsFormBase.php index 01dceec3513..c6cb25f77d4 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/Form/Ajax/ViewsFormBase.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/Form/Ajax/ViewsFormBase.php @@ -169,7 +169,7 @@ abstract class ViewsFormBase extends FormBase implements ViewsFormInterface { // If this form was for view-wide changes, there's no need to regenerate // the display section of the form. if ($display_id !== '') { - \Drupal::entityManager()->getFormController('view', 'edit')->rebuildCurrentTab($view, $response, $display_id); + \Drupal::entityManager()->getFormObject('view', 'edit')->rebuildCurrentTab($view, $response, $display_id); } return $response; diff --git a/core/modules/views_ui/lib/Drupal/views_ui/ViewAddFormController.php b/core/modules/views_ui/lib/Drupal/views_ui/ViewAddForm.php similarity index 97% rename from core/modules/views_ui/lib/Drupal/views_ui/ViewAddFormController.php rename to core/modules/views_ui/lib/Drupal/views_ui/ViewAddForm.php index b5daf5f6c7c..fac46e3ebc6 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/ViewAddFormController.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/ViewAddForm.php @@ -2,7 +2,7 @@ /** * @file - * Contains Drupal\views_ui\ViewAddFormController. + * Contains Drupal\views_ui\ViewAddForm. */ namespace Drupal\views_ui; @@ -15,7 +15,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; /** * Form controller for the Views edit form. */ -class ViewAddFormController extends ViewFormControllerBase { +class ViewAddForm extends ViewFormBase { /** * The wizard plugin manager. @@ -25,7 +25,7 @@ class ViewAddFormController extends ViewFormControllerBase { protected $wizardManager; /** - * Constructs a new ViewEditFormController object. + * Constructs a new ViewEditForm object. * * @param \Drupal\views\Plugin\ViewsPluginManager $wizard_manager * The wizard plugin manager. diff --git a/core/modules/views_ui/lib/Drupal/views_ui/ViewCloneFormController.php b/core/modules/views_ui/lib/Drupal/views_ui/ViewCloneForm.php similarity index 94% rename from core/modules/views_ui/lib/Drupal/views_ui/ViewCloneFormController.php rename to core/modules/views_ui/lib/Drupal/views_ui/ViewCloneForm.php index faedd7182ec..2ec467cdfd2 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/ViewCloneFormController.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/ViewCloneForm.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\views_ui\ViewCloneFormController. + * Contains \Drupal\views_ui\ViewCloneForm. */ namespace Drupal\views_ui; @@ -10,7 +10,7 @@ namespace Drupal\views_ui; /** * Form controller for the Views clone form. */ -class ViewCloneFormController extends ViewFormControllerBase { +class ViewCloneForm extends ViewFormBase { /** * {@inheritdoc} diff --git a/core/modules/views_ui/lib/Drupal/views_ui/ViewDeleteFormController.php b/core/modules/views_ui/lib/Drupal/views_ui/ViewDeleteForm.php similarity index 88% rename from core/modules/views_ui/lib/Drupal/views_ui/ViewDeleteFormController.php rename to core/modules/views_ui/lib/Drupal/views_ui/ViewDeleteForm.php index 22a4d682dd6..64021900f29 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/ViewDeleteFormController.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/ViewDeleteForm.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\views_ui\ViewDeleteFormController. + * Contains \Drupal\views_ui\ViewDeleteForm. */ namespace Drupal\views_ui; @@ -12,7 +12,7 @@ use Drupal\Core\Entity\EntityConfirmFormBase; /** * Provides a delete form for a view. */ -class ViewDeleteFormController extends EntityConfirmFormBase { +class ViewDeleteForm extends EntityConfirmFormBase { /** * {@inheritdoc} diff --git a/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php b/core/modules/views_ui/lib/Drupal/views_ui/ViewEditForm.php similarity index 99% rename from core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php rename to core/modules/views_ui/lib/Drupal/views_ui/ViewEditForm.php index 2436a48768f..39e82d10991 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/ViewEditForm.php @@ -2,7 +2,7 @@ /** * @file - * Contains Drupal\views_ui\ViewEditFormController. + * Contains Drupal\views_ui\ViewEditForm. */ namespace Drupal\views_ui; @@ -22,7 +22,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; /** * Form controller for the Views edit form. */ -class ViewEditFormController extends ViewFormControllerBase { +class ViewEditForm extends ViewFormBase { /** * The views temp store. @@ -39,7 +39,7 @@ class ViewEditFormController extends ViewFormControllerBase { protected $request; /** - * Constructs a new ViewEditFormController object. + * Constructs a new ViewEditForm object. * * @param \Drupal\user\TempStoreFactory $temp_store_factory * The factory for the temp store object. diff --git a/core/modules/views_ui/lib/Drupal/views_ui/ViewFormControllerBase.php b/core/modules/views_ui/lib/Drupal/views_ui/ViewFormBase.php similarity index 96% rename from core/modules/views_ui/lib/Drupal/views_ui/ViewFormControllerBase.php rename to core/modules/views_ui/lib/Drupal/views_ui/ViewFormBase.php index 9c96b48e662..61b872f7772 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/ViewFormControllerBase.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/ViewFormBase.php @@ -2,19 +2,19 @@ /** * @file - * Contains Drupal\views_ui\ViewFormControllerBase. + * Contains Drupal\views_ui\ViewFormBase. */ namespace Drupal\views_ui; -use Drupal\Core\Entity\EntityFormController; +use Drupal\Core\Entity\EntityForm; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; /** - * Base form controller for Views forms. + * Base form for Views forms. */ -abstract class ViewFormControllerBase extends EntityFormController { +abstract class ViewFormBase extends EntityForm { /** * The name of the display used by the form. diff --git a/core/modules/views_ui/lib/Drupal/views_ui/ViewListBuilder.php b/core/modules/views_ui/lib/Drupal/views_ui/ViewListBuilder.php index 0242f5b2447..68ad5b07081 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/ViewListBuilder.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/ViewListBuilder.php @@ -167,7 +167,7 @@ class ViewListBuilder extends ConfigEntityListBuilder { $list['#type'] = 'container'; $list['#attributes']['id'] = 'views-entity-list'; - $list['#attached']['css'] = ViewFormControllerBase::getAdminCSS(); + $list['#attached']['css'] = ViewFormBase::getAdminCSS(); $list['#attached']['library'][] = 'core/drupal.ajax'; $list['#attached']['library'][] = 'views_ui/views_ui.listing'; diff --git a/core/modules/views_ui/lib/Drupal/views_ui/ViewPreviewFormController.php b/core/modules/views_ui/lib/Drupal/views_ui/ViewPreviewForm.php similarity index 95% rename from core/modules/views_ui/lib/Drupal/views_ui/ViewPreviewFormController.php rename to core/modules/views_ui/lib/Drupal/views_ui/ViewPreviewForm.php index c0be8ee713f..e2d2899e377 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/ViewPreviewFormController.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/ViewPreviewForm.php @@ -2,7 +2,7 @@ /** * @file - * Contains Drupal\views_ui\ViewPreviewFormController. + * Contains Drupal\views_ui\ViewPreviewForm. */ namespace Drupal\views_ui; @@ -13,7 +13,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; /** * Form controller for the Views preview form. */ -class ViewPreviewFormController extends ViewFormControllerBase { +class ViewPreviewForm extends ViewFormBase { /** * The views temp store. @@ -23,7 +23,7 @@ class ViewPreviewFormController extends ViewFormControllerBase { protected $tempStore; /** - * Constructs a new ViewPreviewFormController object. + * Constructs a new ViewPreviewForm object. * * @param \Drupal\user\TempStoreFactory $temp_store_factory * The factory for the temp store object. diff --git a/core/modules/views_ui/views_ui.module b/core/modules/views_ui/views_ui.module index 951321cb9af..b1c3437f964 100644 --- a/core/modules/views_ui/views_ui.module +++ b/core/modules/views_ui/views_ui.module @@ -44,11 +44,11 @@ function views_ui_help($path, $arg) { function views_ui_entity_type_build(array &$entity_types) { /** @var $entity_types \Drupal\Core\Entity\EntityTypeInterface[] */ $entity_types['view'] - ->setFormClass('edit', 'Drupal\views_ui\ViewEditFormController') - ->setFormClass('add', 'Drupal\views_ui\ViewAddFormController') - ->setFormClass('preview', 'Drupal\views_ui\ViewPreviewFormController') - ->setFormClass('clone', 'Drupal\views_ui\ViewCloneFormController') - ->setFormClass('delete', 'Drupal\views_ui\ViewDeleteFormController') + ->setFormClass('edit', 'Drupal\views_ui\ViewEditForm') + ->setFormClass('add', 'Drupal\views_ui\ViewAddForm') + ->setFormClass('preview', 'Drupal\views_ui\ViewPreviewForm') + ->setFormClass('clone', 'Drupal\views_ui\ViewCloneForm') + ->setFormClass('delete', 'Drupal\views_ui\ViewDeleteForm') ->setFormClass('break_lock', 'Drupal\views_ui\Form\BreakLockForm') ->setListBuilderClass('Drupal\views_ui\ViewListBuilder') ->setLinkTemplate('edit-form', 'views_ui.edit') diff --git a/core/scripts/switch-psr4.sh b/core/scripts/switch-psr4.sh index 0eebbe5e858..07b68268b52 100644 --- a/core/scripts/switch-psr4.sh +++ b/core/scripts/switch-psr4.sh @@ -9,7 +9,7 @@ namespace Drupal\Core\SwitchPsr4; * * E.g.: * core/modules/action/{lib/Drupal/action → src}/ActionAccessController.php - * core/modules/action/{lib/Drupal/action → src}/ActionAddFormController.php + * core/modules/action/{lib/Drupal/action → src}/ActionAddForm.php */ // Determine DRUPAL_ROOT. diff --git a/core/tests/Drupal/Tests/Core/Entity/Enhancer/EntityRouteEnhancerTest.php b/core/tests/Drupal/Tests/Core/Entity/Enhancer/EntityRouteEnhancerTest.php index 7558b488aac..a2903a9b711 100644 --- a/core/tests/Drupal/Tests/Core/Entity/Enhancer/EntityRouteEnhancerTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/Enhancer/EntityRouteEnhancerTest.php @@ -53,7 +53,7 @@ class EntityRouteEnhancerTest extends UnitTestCase { $this->assertEquals($new_defaults['_content'][1], 'getContentResult'); $this->assertEquals($defaults['_controller'], $new_defaults['_controller'], '_controller got overridden.'); - // Set _entity_form and ensure that the form controller is set. + // Set _entity_form and ensure that the form is set. $defaults = array(); $defaults['_entity_form'] = 'entity_test.default'; $new_defaults = $route_enhancer->enhance($defaults, $request); diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityFormBuilderTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityFormBuilderTest.php index ecba429e837..42b619113d9 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityFormBuilderTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityFormBuilderTest.php @@ -64,12 +64,12 @@ class EntityFormBuilderTest extends UnitTestCase { ->with('the_form_id', $this->isType('array')) ->will($this->returnValue('the form contents')); - $form_controller = $this->getMock('Drupal\Core\Entity\EntityFormControllerInterface'); + $form_controller = $this->getMock('Drupal\Core\Entity\EntityFormInterface'); $form_controller->expects($this->any()) ->method('getFormId') ->will($this->returnValue('the_form_id')); $this->entityManager->expects($this->any()) - ->method('getFormController') + ->method('getFormObject') ->with('the_entity_type', 'default') ->will($this->returnValue($form_controller)); diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php index 5b3a7e17112..080d79f04df 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php @@ -325,11 +325,11 @@ class EntityManagerTest extends UnitTestCase { } /** - * Tests the getFormController() method. + * Tests the getFormObject() method. * - * @covers ::getFormController() + * @covers ::getFormObject() */ - public function testGetFormController() { + public function testGetFormObject() { $apple = $this->getMock('Drupal\Core\Entity\EntityTypeInterface'); $apple->expects($this->once()) ->method('getFormClass') @@ -345,25 +345,25 @@ class EntityManagerTest extends UnitTestCase { 'banana' => $banana, )); - $apple_form = $this->entityManager->getFormController('apple', 'default'); + $apple_form = $this->entityManager->getFormObject('apple', 'default'); $this->assertInstanceOf('Drupal\Tests\Core\Entity\TestEntityForm', $apple_form); $this->assertAttributeInstanceOf('Drupal\Core\Extension\ModuleHandlerInterface', 'moduleHandler', $apple_form); $this->assertAttributeInstanceOf('Drupal\Core\StringTranslation\TranslationInterface', 'translationManager', $apple_form); - $banana_form = $this->entityManager->getFormController('banana', 'default'); + $banana_form = $this->entityManager->getFormObject('banana', 'default'); $this->assertInstanceOf('Drupal\Tests\Core\Entity\TestEntityFormInjected', $banana_form); $this->assertAttributeEquals('yellow', 'color', $banana_form); } /** - * Tests the getFormController() method with an invalid operation. + * Tests the getFormObject() method with an invalid operation. * - * @covers ::getFormController() + * @covers ::getFormObject() * * @expectedException \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException */ - public function testGetFormControllerInvalidOperation() { + public function testGetFormObjectInvalidOperation() { $entity = $this->getMock('Drupal\Core\Entity\EntityTypeInterface'); $entity->expects($this->once()) ->method('getFormClass') @@ -371,7 +371,7 @@ class EntityManagerTest extends UnitTestCase { ->will($this->returnValue('')); $this->setUpEntityManager(array('test_entity_type' => $entity)); - $this->entityManager->getFormController('test_entity_type', 'edit'); + $this->entityManager->getFormObject('test_entity_type', 'edit'); } /**