소스 검색

Merge pull request #473 from maastermedia/master

Console documentation created
Thomas 13 년 전
부모
커밋
052d6f31f8
2개의 변경된 파일68개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      Resources/doc/index.rst
  2. 67 0
      Resources/doc/reference/console.rst

+ 1 - 0
Resources/doc/index.rst

@@ -29,3 +29,4 @@ Reference Guide
    reference/translation
    reference/security
    reference/advance
+   reference/console

+ 67 - 0
Resources/doc/reference/console.rst

@@ -0,0 +1,67 @@
+Console/Command-Line Commands
+=============================
+
+SonataAdminBundle provides the following console commands:
+
+* cache:create-cache-class
+* sonata:admin:explain
+* sonata:admin:list
+* sonata:admin:setup-acl
+
+
+cache:create-cache-class
+------------------------
+
+The ``cache:create-cache-class`` command generates the cache class
+(app/cache/...env.../classes.php) from the classes.map file.
+
+Usage example:
+
+.. code-block:: bash
+
+    php app/console cache:create-cache-class
+
+
+sonata:admin:explain
+--------------------
+
+The ``sonata:admin:explain`` command prints details about the admin of a model.
+As an argument you need to specify admin service id of the model you need
+explaining.
+
+Usage example:
+
+.. code-block:: bash
+
+    php app/console sonata:admin:explain sonata.news.admin.post
+
+
+sonata:admin:list
+-----------------
+
+If you wish to see which admin services are available, you can use
+``sonata:admin:list`` command. It prints all the admin service ids available in
+your application. Command gets ids from ``sonata.admin.pool`` service where all
+the available admin services are present.
+
+Usage example:
+
+.. code-block:: bash
+
+    php app/console sonata:admin:list
+
+
+sonata:admin:setup-acl
+----------------------
+
+The ``sonata:admin:setup-acl`` command updates ACL definitions for all admin
+classes available in ``sonata.admin.pool``. For instance everytime you create a
+new ``Admin`` class, you can create ACL by using the ``sonata:admin:setup-acl``
+command. The ACL database will be automatically updated with the latest masks
+and roles informations.
+
+Usage example:
+
+.. code-block:: bash
+
+    php app/console sonata:admin:setup-acl