Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Components][Form] add versionadded for the data collector form extension#3887

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletionscomponents/form/form_events.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -110,6 +110,9 @@ the form.

.. sidebar:: ``FormEvents::POST_SET_DATA`` in the Form component

.. versionadded:: 2.4
The data collector extension was introduced in Symfony 2.4.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

will this work? Maybe it's nicer if we placed this before the sidebar directive

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

In the default Sphinx template it does work. Placing it outside the sidebar directive is no option because you wouldn't know where it would actually be rendered then.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@javiereguiluz What do think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@xabbuh you are right about being better to place theversionadded directive inside the sidebar.

The problem is that I don't know how to do it. I find Sphinx absurdly complex and the Python/Sphinx community doesn't help us. Take for example the question about adding titles inside the sidebars. We asked for help on GitHub, Twitter andeven on the official Shpinx user group. No one helped us.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Is there really anything special for you to do? I mean, using the default Sphinx template causes no problems. So, what I was wondering about was if there is something for you to do in the template. Or if this just rendered smoothly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@xabbuh this is the code we use to render sidebars:

defvisit_sidebar(self,node):self.body.append(self.starttag(node,'div',CLASS=('admonition-wrapper')))self.body.append('<div></div>')self.body.append('<div>')self.set_first_last(node)self.in_sidebar=1defdepart_sidebar(self,node):self.body.append('</div></div>\n')self.in_sidebar=None

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Seems to be valid. I guess we can just try this out and have a look what it looks like when this is built.


The :class:`Symfony\\Component\\Form\\Extension\\DataCollector\\EventListener\\DataCollectorListener`
class is subscribed to listen to the ``FormEvents::POST_SET_DATA`` event
in order to collect information about the forms from the denormalized
Expand DownExpand Up@@ -218,6 +221,9 @@ It can be used to fetch data after denormalization.

.. sidebar:: ``FormEvents::POST_SUBMIT`` in the Form component

.. versionadded:: 2.4
The data collector extension was introduced in Symfony 2.4.

The :class:`Symfony\\Component\\Form\\Extension\\DataCollector\\EventListener\\DataCollectorListener`
subscribes to the ``FormEvents::POST_SUBMIT`` event in order to collect
information about the forms.
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp