Skip to content

Commit

Permalink
updated docs for child admins
Browse files Browse the repository at this point in the history
  • Loading branch information
OskarStark committed Jun 4, 2018
1 parent d92433e commit 08b1cfb
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions docs/reference/child_admin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,25 @@ its parent:

.. configuration-block::

.. code-block:: yaml
# app/config/services.yml
app.admin.playlist:
class: App\Admin\PlaylistAdmin
calls:
- [ addChild, ['@app.admin.video', 'video']]
.. code-block:: xml
<!-- app/config/config.xml -->
<service id="sonata.admin.playlist" class="App\Admin\PlaylistAdmin">
<!-- app/config/services.xml -->
<service id="app.admin.playlist" class="App\Admin\PlaylistAdmin">
<!-- ... -->
<call method="addChild">
<argument type="service" id="sonata.admin.video" />
<argument>playlist</argument>
<argument type="service" id="app.admin.video" />
<argument>video</argument>
</call>
</service>
Expand Down

0 comments on commit 08b1cfb

Please sign in to comment.