Skip to content

Commit

Permalink
minor #6466 docs: minor syntax fixes (JorickPepin)
Browse files Browse the repository at this point in the history
This PR was merged into the 4.x branch.

Discussion
----------

docs: minor syntax fixes

<!--
Thanks for your contribution! If you are proposing a new feature that is complex,
please open an issue first so we can discuss about it.

Note: all your contributions adhere implicitly to the MIT license
-->

Commits
-------

3ed98c6 docs: minor syntax fixes
  • Loading branch information
javiereguiluz committed Oct 12, 2024
2 parents 67994e3 + 3ed98c6 commit 1e59fd1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/fields.rst
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ Misc. Options

// a custom HTML attribute added when rendering the field
// e.g. setAttribute('data-foo', 'bar') renders a 'data-foo="bar"' attribute in HTML
// it's a shortcut for the equivalent setFormTypeOption('attr.data-foo', 'bar)
// it's a shortcut for the equivalent setFormTypeOption('attr.data-foo', 'bar')
->setHtmlAttribute('attribute_name', 'attribute_value')

// a key-value array of attributes to add to the HTML element
Expand Down
2 changes: 1 addition & 1 deletion doc/tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ First, your test class need to extend the ``AbstractCrudTestCase``::
# tests/Admin/Controller/CategoryCrudControllerTest.php
namespace App\Tests\Admin\Controller;

use App\Controller\Admin\AppDashboardController;
use App\Controller\Admin\CategoryCrudController;
use App\Controller\Admin\AppDashboardController
use EasyCorp\Bundle\EasyAdminBundle\Test\AbstractCrudTestCase;

final class CategoryCrudControllerTest extends AbstractCrudTestCase
Expand Down
2 changes: 1 addition & 1 deletion src/Field/FieldTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public function setFormTypeOptionIfNotSet(string $optionName, $optionValue): sel
/**
* Sets the value of a custom HTML attribute that will be added when rendering the field.
* E.g. setAttribute('data-foo', 'bar') will render a 'data-foo="bar"' attribute in HTML.
* It's a shortcut for the equivalent setFormTypeOption('attr.data-foo', 'bar).
* It's a shortcut for the equivalent setFormTypeOption('attr.data-foo', 'bar').
*/
public function setHtmlAttribute(string $attributeName, $attributeValue): self
{
Expand Down

0 comments on commit 1e59fd1

Please sign in to comment.