Skip to content

Commit

Permalink
docs: minor syntax fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JorickPepin committed Oct 9, 2024
1 parent 67994e3 commit 490a897
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 @@ -27,7 +27,7 @@ First, your test class need to extend the ``AbstractCrudTestCase``::
namespace App\Tests\Admin\Controller;

use App\Controller\Admin\CategoryCrudController;
use App\Controller\Admin\AppDashboardController
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 490a897

Please sign in to comment.