-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
updated docs for child admins #5115
Conversation
docs/reference/child_admin.rst
Outdated
<argument type="service" id="sonata.admin.video" /> | ||
<argument>playlist</argument> | ||
<argument type="service" id="app.admin.video" /> | ||
<argument>video</argument> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure, but I guess it should be the name of the child like this? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nop, you need to provide parent field on your child entity. So if Video is the entity it should have playlist
field that points to Playlist Entity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, my bad there, I rechecked the code a few minutes ago and then I see it is the name of the parent or in this case the value you had in your $parentAssociationMapping
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok 👍
docs/reference/child_admin.rst
Outdated
.. code-block:: yaml | ||
|
||
# app/config/services.yml | ||
app.admin.playlist: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about using the FQCN of the class here?
docs/reference/child_admin.rst
Outdated
<!-- app/config/config.xml --> | ||
<service id="sonata.admin.playlist" class="App\Admin\PlaylistAdmin"> | ||
<!-- app/config/services.xml --> | ||
<service id="App\Admin\PlaylistAdmin" class="App\Admin\PlaylistAdmin"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we still need the class attribute?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure for XML 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we keep them in all our config files, so the docs should be the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@OskarStark here such services are described with id
attribute only (see XML tab)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@OskarStark looks like we made a mistake then 😅 please remove them
all comments applied 👍 |
For the FQCN, see symfony/symfony-docs#9886 |
@greg0ire please merge 😄 |
I forgot this is about docs, so yeah, very mergeable, no need to wait for this. |
@greg0ire the build failed on |
Didn't we have that on Media also? because of new phpcs fixer |
Highly probable. |
Refs #5109
app.admin.....
instead ofsonata.admin......