Skip to content

Commit 0287b2a

Browse files
committed
minor #2631 [LiveComponent] Remove mention of deprecated annotation in docs (smnandre)
This PR was merged into the 2.x branch. Discussion ---------- [LiveComponent] Remove mention of deprecated annotation in docs | Q | A | ------------- | --- | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Issues | Fix #... | License | MIT After a question on Slack asking what was the `#[Security]` attribute :) Commits ------- a7cf2f8 [LiveComponent] Remove mention of deprecated annotation
2 parents 31fd264 + a7cf2f8 commit 0287b2a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/LiveComponent/doc/index.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,10 +1047,11 @@ Actions
10471047

10481048
Live components require a single "default action" that is used to
10491049
re-render it. By default, this is an empty ``__invoke()`` method and can
1050-
be added with the ``DefaultActionTrait``. Live components are actually
1051-
Symfony controllers so you can add the normal controller
1052-
attributes/annotations (i.e. ``#[Cache]``/``#[Security]``) to either the
1053-
entire class just a single action.
1050+
be added with the ``DefaultActionTrait``.
1051+
1052+
Live components __are__ actually Symfony controllers so you can add
1053+
controller attributes (i.e. ``#[IsGranted]``) to either the entire class
1054+
just a single action.
10541055

10551056
You can also trigger custom actions on your component. Let's pretend we
10561057
want to add a "Reset Max" button to our "random number" component

0 commit comments

Comments
 (0)