SonataAdminBundle provides the following console commands:
cache:create-cache-class
sonata:admin:explain
sonata:admin:list
sonata:admin:setup-acl
The cache:create-cache-class
command generates the cache class
(app/cache/...env.../classes.php
) from the classes.map file.
Usage example:
php app/console cache:create-cache-class
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:
php app/console sonata:admin:explain sonata.news.admin.post
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:
php app/console sonata:admin:list
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:
php app/console sonata:admin:setup-acl
Found a typo? Something is wrong in this documentation? Just fork and edit it!