|
пре 14 година | |
---|---|---|
Admin | пре 14 година | |
Builder | пре 14 година | |
Command | пре 14 година | |
Controller | пре 14 година | |
Datagrid | пре 14 година | |
DependencyInjection | пре 14 година | |
Filter | пре 14 година | |
Form | пре 14 година | |
Model | пре 14 година | |
Resources | пре 14 година | |
Route | пре 14 година | |
Tests | пре 14 година | |
Twig | пре 14 година | |
.gitignore | пре 14 година | |
CHANGES | пре 14 година | |
CREDITS | пре 14 година | |
LICENSE | пре 14 година | |
README.md | пре 14 година | |
SonataAdminBundle.php | пре 14 година | |
phpunit.xml.dist | пре 14 година |
Defining an Admin
class is pretty easy: simply define fields as properties
class PostAdmin extends Admin
{
protected $form = array(
'author' => array('edit' => 'list'),
'enabled' => array('form_field_options' => array('required' => false)),
'title',
'abstract',
'content',
'tags' => array('form_field_options' => array('expanded' => true)),
'commentsCloseAt',
'commentsEnabled' => array('form_field_options' => array('required' => false)),
);
protected $list = array(
'title' => array('identifier' => true),
'author',
'enabled',
'commentsEnabled',
);
protected $filter = array(
'title',
'author',
'enabled',
);
}
Screenshots : http://www.dropbox.com/gallery/581816/2/BaseApplicationBundle/preview?h=59b2e8
Of course, power users will be happy as an Admin
class is very flexible as all dependencies are
injected by the DIC.
Dashboard
List
Edit/Create
Templating
Others
You need to go to the Ressources/doc
folder where the reStructuredText documentation is available.
Please note the Github preview might break and hide some content.
Usage examples