diff --git a/docs/reference/form_field_definition.rst b/docs/reference/form_field_definition.rst index 0f0883456..a7b4107d0 100644 --- a/docs/reference/form_field_definition.rst +++ b/docs/reference/form_field_definition.rst @@ -24,14 +24,10 @@ Example $formMapper ->add('author', ModelListType::class, []) ->add('enabled') - ->add('title') + // you can define help messages using Symfony help option + ->add('title', null, ['help' => 'help_post_title']) ->add('abstract', null, ['required' => false]) - ->add('content') - - // you can define help messages like this - ->setHelps([ - 'title' => $this->trans('help_post_title') - ]); + ->add('content'); } public function validate(ErrorElement $errorElement, $object) diff --git a/tests/Admin/FieldDescriptionTest.php b/tests/Admin/FieldDescriptionTest.php index 0364a7553..e2be351cc 100644 --- a/tests/Admin/FieldDescriptionTest.php +++ b/tests/Admin/FieldDescriptionTest.php @@ -146,14 +146,6 @@ public function testGetParent(): void $this->assertSame($adminMock, $field->getParent()); } - public function testGetHelp(): void - { - $field = new FieldDescription(); - $field->setHelp('help message'); - - $this->assertSame($field->getHelp(), 'help message'); - } - public function testGetAdmin(): void { $adminMock = $this->createMock(AdminInterface::class);