I want to get my image thumbnail listed in list area, i don't know how to do that, can any one please help me. I Got my caption in back end. I am using Sonata adim bundle and following its official document.
here is my imageAdmin.php
namespace swaam\ImageUploaderBundle\Admin;
use Sonata\AdminBundle\Admin\Admin;
use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Datagrid\DatagridMapper;
use Sonata\AdminBundle\Form\FormMapper;
class ImageAdmin extends Admin
{
// Fields to be shown on create/edit forms
protected function configureFormFields(FormMapper $formMapper)
{
$formMapper
->add('caption', 'ckeditor', array('label' => 'Ca ption'))
// ->add('file', 'entity', array('class' => 'swaam\ImageUploaderBundle\Entity\image'))
->add('file', 'file', array('data_class' => 'Symfony\Component\HttpFoundation\File\File'
,'property_path' => 'file'
))
->end(); //if no type is specified, SonataAdminBundle tries to guess it
;
}
// Fields to be shown on filter forms
protected function configureDatagridFilters(DatagridMapper $datagridMapper)
{
$datagridMapper
->add('caption')
->add('thumbpath')
;
}
// Fields to be shown on lists
protected function configureListFields(ListMapper $listMapper)
{
$listMapper
->addIdentifier('caption')
// ->add('thumbpath')
->add('thumbpath')
;
}
}
Cassiano Valle Tartari
MSc. Computer Engineer
Tel: +55.48.84474818
Email: fal...@cassianotartari.eng.br
Site: http://www.cassianotartari.eng.br
--
You received this message because you are subscribed to a topic in the Google Groups "sonata-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonata-users/S1D2VZoRlvE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonata-users...@googlegroups.com.
To post to this group, send email to sonata...@googlegroups.com.
Visit this group at http://groups.google.com/group/sonata-users.
For more options, visit https://groups.google.com/d/optout.
--