Browse Source

Merge remote-tracking branch 'jaimesuez/master'

Thomas Rabaix 14 years ago
parent
commit
b4667a7452

+ 11 - 0
Resources/doc/reference/installation.rst

@@ -86,3 +86,14 @@ Once you have created an admin class, you must declare the class to use it. Like
         <argument>Sonata\NewsBundle\Entity\Post</argument>
         <argument>Sonata\NewsBundle\Entity\Post</argument>
         <argument>SonataNewsBundle:PostAdmin</argument>
         <argument>SonataNewsBundle:PostAdmin</argument>
     </service>
     </service>
+
+Or if you're using an YML configuration file,
+
+.. code-block:: yml
+
+    services:
+       sonata.news.admin.post:
+          class: Sonata\NewsBundle\Admin\PostAdmin
+          tags:
+            - { name: sonata.admin, manager_type: orm, group: sonata_blog, label: post }
+          arguments: [null, Sonata\NewsBundle\Entity\Post, SonataNewsBundle:PostAdmin]

+ 2 - 2
Resources/doc/tutorial/creating_your_first_admin_class/defining_admin_class.rst

@@ -35,6 +35,7 @@ Secondly, register the PostAdmin class inside the DIC in your config.xml file.
 
 
         <tag name="sonata.admin" manager_type="orm" group="sonata_blog" label="post"/>
         <tag name="sonata.admin" manager_type="orm" group="sonata_blog" label="post"/>
 
 
+        <argument/>
         <argument>Sonata\NewsBundle\Entity\Post</argument>
         <argument>Sonata\NewsBundle\Entity\Post</argument>
         <argument>SonataNewsBundle:PostAdmin</argument>
         <argument>SonataNewsBundle:PostAdmin</argument>
     </service>
     </service>
@@ -48,8 +49,7 @@ Or if you're using an YML configuration file,
           class: Sonata\NewsBundle\Admin\PostAdmin
           class: Sonata\NewsBundle\Admin\PostAdmin
           tags:
           tags:
             - { name: sonata.admin, manager_type: orm, group: sonata_blog, label: post }
             - { name: sonata.admin, manager_type: orm, group: sonata_blog, label: post }
-          arguments: ['', Sonata\NewsBundle\Entity\Post, SonataNewsBundle:PostAdmin]
-
+          arguments: [null, Sonata\NewsBundle\Entity\Post, SonataNewsBundle:PostAdmin]
 
 
 These is the minimal configuration required to display the entity inside the dashboard and
 These is the minimal configuration required to display the entity inside the dashboard and
 interact with the CRUD interface. However, you need to create your admin Controller.
 interact with the CRUD interface. However, you need to create your admin Controller.