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..960a7a5 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 @@ -85,6 +85,9 @@ 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() + * instead. */ function field_test_entity_nested_form_validate($form, &$form_state) { $entity_1 = entity_create('entity_test', array( @@ -104,6 +107,9 @@ 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() + * instead. */ 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..93d0773 --- /dev/null +++ b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Form/EntityNestedForm.php @@ -0,0 +1,61 @@ +