And this is a class that will provide Post management in the admin panel:
class PostAdmin extends Admin
{
// Fields to be shown on create/edit forms
protected function configureFormFields(FormMapper $formMapper)
{
$formMapper
->add('title', 'text', array('label' => 'Post Title'))
->add('author', 'entity', array('class' => 'Acme\DemoBundle\Entity\User'))
->add('body') //if no type is specified, SonataAdminBundle tries to guess it
;
}
// Fields to be shown on filter forms
protected function configureDatagridFilters(DatagridMapper $datagridMapper)
{
$datagridMapper
->add('title')
->add('author')
;
}
// Fields to be shown on lists
protected function configureListFields(ListMapper $listMapper)
{
$listMapper
->addIdentifier('title')
->add('slug')
->add('author')
;
}
}
My question is: is it possible to have an auto-completion/auto-suggestion feature for the field names and array-based parameters? (like we have it for Symfony Forms)
i also sometimes use the sonata stuff, is really annoying to not have autocompletion here. but i will not integrate it into the main plugin. a possible external plugin can fill the data here. so stay tuned...
Here is the documentation page for SonataAdminBundle architecture: http://sonata-project.org/bundles/admin/master/doc/reference/architecture.html
And this is a class that will provide Post management in the admin panel:
My question is: is it possible to have an auto-completion/auto-suggestion feature for the field names and array-based parameters? (like we have it for Symfony Forms)