Skip to content

Commit

Permalink
minor #5784 Fix method names in example. (vlad-ghita)
Browse files Browse the repository at this point in the history
This PR was merged into the 4.x branch.

Discussion
----------

Fix method names in example.

<!--
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
-------

494e438 Fix method names in example.
  • Loading branch information
javiereguiluz committed Jun 6, 2023
2 parents 571f79b + 494e438 commit 4ab950f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/fields.rst
Original file line number Diff line number Diff line change
Expand Up @@ -577,9 +577,9 @@ precise control, use the ``Asset`` class to define the assets::
// ...

TextField::new('firstName', 'Name')
->addCssFiles(Asset::new('bundle/some-bundle/foo.css')->ignoreOnForms()->htmlAttr('media', 'print'))
->addCssFiles(Asset::new('bundle/some-bundle/foo.css')->ignoreOnForm()->htmlAttr('media', 'print'))
->addJsFiles(Asset::new('admin/some-custom-code.js')->onlyOnIndex()->defer())
->addWebpackEncoreEntry(Asset::new('admin-maps')->onlyWhenCreating()->preload())
->addWebpackEncoreEntries(Asset::new('admin-maps')->onlyWhenCreating()->preload())
// you can even define the Symfony Asset package which the asset belongs to
->addCssFiles(Asset::new('some-path/bar.css')->package('legacy_assets'))
;
Expand Down

0 comments on commit 4ab950f

Please sign in to comment.