【发布时间】:2014-08-21 16:46:57
【问题描述】:
我正在一个 symfony2 项目中使用 SonataAdminBundle,我的管理类如下所示:
class ApartmentsAdmin extends Admin
{
protected function configureFormFields(FormMapper $formMapper)
{
->add('images', 'collection', array(
'type' => new ImageType(),
'allow_add' => true,
'allow_delete' => true,
'by_reference' => true,
'mapped' => true,
'label' => false,
'required' => false,
'label' => 'Apartment Images'
));
}
}
它工作正常;但我的问题是,在编辑页面上,我想让查看图像集合中包含的每个图像的预览。在“SonataAdminBundle”的文档中,为一个单独的图像提供了图像预览,但是如何对集合图像进行预览..
请给我建议..
非常感谢..
【问题讨论】:
标签: jquery html doctrine-orm symfony-2.3 php-5.4