diff --git a/core/modules/field/tests/modules/field_test/field_test.entity.inc b/core/modules/field/tests/modules/field_test/field_test.entity.inc index b6aa86e..3873d2f 100644 --- a/core/modules/field/tests/modules/field_test/field_test.entity.inc +++ b/core/modules/field/tests/modules/field_test/field_test.entity.inc @@ -44,7 +44,7 @@ function field_test_entity_info_translatable($entity_type = NULL, $translatable /** * Form combining two separate entities. * - * @deprecated Use \Drupal\field_test\Form\FieldTestForm::testEntityNestedForm() + * @deprecated Use \Drupal\field_test\Form\EntityNestedForm::buildForm() */ function field_test_entity_nested_form($form, &$form_state, $entity_1, $entity_2) { // First entity. @@ -85,6 +85,8 @@ function field_test_entity_nested_form($form, &$form_state, $entity_1, $entity_2 /** * Validate handler for field_test_entity_nested_form(). + * + * @deprecated Use \Drupal\field_test\Form\EntityNestedForm::validateForm() */ function field_test_entity_nested_form_validate($form, &$form_state) { $entity_1 = entity_create('entity_test', array( @@ -104,6 +106,8 @@ function field_test_entity_nested_form_validate($form, &$form_state) { /** * Submit handler for field_test_entity_nested_form(). + * + * @deprecated Use \Drupal\field_test\Form\EntityNestedForm::submitForm() */ function field_test_entity_nested_form_submit($form, &$form_state) { $entity_1 = entity_create('entity_test', array( diff --git a/core/modules/field/tests/modules/field_test/field_test.routing.yml b/core/modules/field/tests/modules/field_test/field_test.routing.yml index b7ba00c..5d2d7ee 100644 --- a/core/modules/field/tests/modules/field_test/field_test.routing.yml +++ b/core/modules/field/tests/modules/field_test/field_test.routing.yml @@ -2,12 +2,12 @@ field_test.entity_nested_form: path: '/test-entity/nested/{entity_1}/{entity_2}' defaults: _title: 'Nested entity form' - _content: '\Drupal\field_test\Form\FieldTestForm::testEntityNestedForm' + _form: '\Drupal\field_test\Form\EntityNestedForm' + requirements: + _permission: 'administer entity_test content' options: parameters: entity_1: type: 'entity:entity_test' entity_2: type: 'entity:entity_test' - requirements: - _permission: 'administer entity_test content' diff --git a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Form/EntityNestedForm.php b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Form/EntityNestedForm.php new file mode 100644 index 0000000..0c31ea7 --- /dev/null +++ b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Form/EntityNestedForm.php @@ -0,0 +1,61 @@ +