Issue #2238077 by Berdir, alexpott, tim.plunkett: Rename EntityFormController to EntityForm.
parent
3937bda8e6
commit
c79ac2f741
|
@ -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}
|
||||
|
|
|
@ -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.
|
|
@ -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.
|
|
@ -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}
|
||||
|
|
|
@ -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
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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.
|
|
@ -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));
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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.
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains Drupal\action\ActionEditForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\action;
|
||||
|
||||
/**
|
||||
* Provides a form for action edit forms.
|
||||
*/
|
||||
class ActionEditForm extends ActionFormBase {
|
||||
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains Drupal\action\ActionEditFormController.
|
||||
*/
|
||||
|
||||
namespace Drupal\action;
|
||||
|
||||
/**
|
||||
* Provides a form controller for action edit forms.
|
||||
*/
|
||||
class ActionEditFormController extends ActionFormControllerBase {
|
||||
|
||||
}
|
|
@ -2,20 +2,20 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* Contains Drupal\action\ActionEditFormController.
|
||||
* Contains Drupal\action\ActionEditForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\action;
|
||||
|
||||
use Drupal\Core\Entity\EntityFormController;
|
||||
use Drupal\Core\Entity\EntityForm;
|
||||
use Drupal\Core\Entity\EntityStorageInterface;
|
||||
use Drupal\Core\Plugin\PluginFormInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
|
||||
/**
|
||||
* Provides a base form controller for action forms.
|
||||
* Provides a base form for action forms.
|
||||
*/
|
||||
abstract class ActionFormControllerBase extends EntityFormController {
|
||||
abstract class ActionFormBase extends EntityForm {
|
||||
|
||||
/**
|
||||
* The action plugin being configured.
|
|
@ -24,7 +24,7 @@ use Drupal\aggregator\FeedInterface;
|
|||
* "storage" = "Drupal\aggregator\FeedStorage",
|
||||
* "view_builder" = "Drupal\aggregator\FeedViewBuilder",
|
||||
* "form" = {
|
||||
* "default" = "Drupal\aggregator\FeedFormController",
|
||||
* "default" = "Drupal\aggregator\FeedForm",
|
||||
* "delete" = "Drupal\aggregator\Form\FeedDeleteForm",
|
||||
* "delete_items" = "Drupal\aggregator\Form\FeedItemsDeleteForm",
|
||||
* }
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\aggregator\FeedFormController.
|
||||
* Contains \Drupal\aggregator\FeedForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\aggregator;
|
||||
|
||||
use Drupal\Component\Utility\String;
|
||||
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;
|
||||
|
@ -16,7 +16,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
/**
|
||||
* Form controller for the aggregator feed edit forms.
|
||||
*/
|
||||
class FeedFormController extends ContentEntityFormController {
|
||||
class FeedForm extends ContentEntityForm {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\custom_block\CustomBlockFormController.
|
||||
* Contains \Drupal\custom_block\CustomBlockForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\custom_block;
|
||||
|
||||
use Drupal\Core\Cache\Cache;
|
||||
use Drupal\Core\Entity\ContentEntityFormController;
|
||||
use Drupal\Core\Entity\ContentEntityForm;
|
||||
use Drupal\Core\Entity\EntityManagerInterface;
|
||||
use Drupal\Core\Entity\EntityStorageInterface;
|
||||
use Drupal\Core\Language\Language;
|
||||
|
@ -18,7 +18,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
/**
|
||||
* Form controller for the custom block edit forms.
|
||||
*/
|
||||
class CustomBlockFormController extends ContentEntityFormController {
|
||||
class CustomBlockForm extends ContentEntityForm {
|
||||
|
||||
/**
|
||||
* The custom block storage.
|
||||
|
@ -35,7 +35,7 @@ class CustomBlockFormController extends ContentEntityFormController {
|
|||
protected $languageManager;
|
||||
|
||||
/**
|
||||
* Constructs a CustomBlockFormController object.
|
||||
* Constructs a CustomBlockForm object.
|
||||
*
|
||||
* @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
|
||||
* The entity manager.
|
||||
|
@ -63,7 +63,7 @@ class CustomBlockFormController extends ContentEntityFormController {
|
|||
}
|
||||
|
||||
/**
|
||||
* Overrides \Drupal\Core\Entity\EntityFormController::prepareEntity().
|
||||
* Overrides \Drupal\Core\Entity\EntityForm::prepareEntity().
|
||||
*
|
||||
* Prepares the custom block object.
|
||||
*
|
||||
|
@ -167,7 +167,7 @@ class CustomBlockFormController extends ContentEntityFormController {
|
|||
}
|
||||
|
||||
/**
|
||||
* Overrides \Drupal\Core\Entity\EntityFormController::submit().
|
||||
* Overrides \Drupal\Core\Entity\EntityForm::submit().
|
||||
*
|
||||
* Updates the custom block object by processing the submitted values.
|
||||
*
|
|
@ -2,21 +2,21 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\custom_block\CustomBlockTypeFormController.
|
||||
* Contains \Drupal\custom_block\CustomBlockTypeForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\custom_block;
|
||||
|
||||
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 CustomBlockTypeFormController extends EntityFormController {
|
||||
class CustomBlockTypeForm 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);
|
||||
|
@ -85,7 +85,7 @@ class CustomBlockTypeFormController extends EntityFormController {
|
|||
}
|
||||
|
||||
/**
|
||||
* Overrides \Drupal\Core\Entity\EntityFormController::save().
|
||||
* Overrides \Drupal\Core\Entity\EntityForm::save().
|
||||
*/
|
||||
public function save(array $form, array &$form_state) {
|
||||
$block_type = $this->entity;
|
|
@ -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"
|
||||
* },
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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.
|
|
@ -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"
|
||||
* }
|
||||
* },
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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.
|
|
@ -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.
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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']);
|
|
@ -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"
|
||||
|
|
|
@ -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;
|
|
@ -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",
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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;
|
|
@ -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"
|
||||
* }
|
||||
* },
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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();
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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'));
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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}
|
|
@ -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}
|
|
@ -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}
|
|
@ -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.
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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.
|
|
@ -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.
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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;
|
|
@ -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;
|
|
@ -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) {
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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;
|
|
@ -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}
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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 */
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
* }
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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);
|
|
@ -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;
|
|
@ -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') {
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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',
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
* },
|
||||
|
|
|
@ -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"
|
||||
* },
|
||||
|
|
|
@ -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"
|
||||
* },
|
||||
|
|
|
@ -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"
|
||||
* },
|
||||
|
|
|
@ -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"
|
||||
* },
|
||||
|
|
|
@ -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"
|
||||
* },
|
||||
|
|
|
@ -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}
|
|
@ -1,21 +1,21 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Definition of Drupal\entity_test\EntityTestFormController.
|
||||
* Definition of Drupal\entity_test\EntityTestForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\entity_test;
|
||||
|
||||
use Drupal\Core\Entity\ContentEntityFormController;
|
||||
use Drupal\Core\Entity\ContentEntityForm;
|
||||
use Drupal\Core\Language\Language;
|
||||
|
||||
/**
|
||||
* Form controller for the test entity edit forms.
|
||||
*/
|
||||
class EntityTestFormController extends ContentEntityFormController {
|
||||
class EntityTestForm extends ContentEntityForm {
|
||||
|
||||
/**
|
||||
* 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);
|
||||
|
@ -61,7 +61,7 @@ class EntityTestFormController extends ContentEntityFormController {
|
|||
}
|
||||
|
||||
/**
|
||||
* Overrides \Drupal\Core\Entity\EntityFormController::submit().
|
||||
* Overrides \Drupal\Core\Entity\EntityForm::submit().
|
||||
*/
|
||||
public function submit(array $form, array &$form_state) {
|
||||
// Build the entity object from the submitted values.
|
||||
|
@ -76,7 +76,7 @@ class EntityTestFormController extends ContentEntityFormController {
|
|||
}
|
||||
|
||||
/**
|
||||
* Overrides Drupal\Core\Entity\EntityFormController::save().
|
||||
* Overrides Drupal\Core\Entity\EntityForm::save().
|
||||
*/
|
||||
public function save(array $form, array &$form_state) {
|
||||
$entity = $this->entity;
|
||||
|
@ -106,4 +106,5 @@ class EntityTestFormController extends ContentEntityFormController {
|
|||
$form_state['rebuild'] = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
* }
|
||||
|
|
|
@ -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.
|
|
@ -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)) {
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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}
|
|
@ -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.
|
|
@ -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"
|
||||
* }
|
||||
* },
|
||||
|
|
|
@ -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"
|
||||
* },
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue