Jquery 如何在symfony collection图像中获得图像预览
我在一个symfony2项目中使用SonatAdminBundle,其中我的管理类如下所示:Jquery 如何在symfony collection图像中获得图像预览,jquery,html,doctrine-orm,symfony-2.3,php-5.4,Jquery,Html,Doctrine Orm,Symfony 2.3,Php 5.4,我在一个symfony2项目中使用SonatAdminBundle,其中我的管理类如下所示: class ApartmentsAdmin extends Admin { protected function configureFormFields(FormMapper $formMapper) { ->add('images', 'collection', array( 'type' => new ImageT
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”文档中,为一个单独的图像提供了图像预览,但如何才能对采集的图像进行预览
请建议我
非常感谢。最后,我可以通过“自定义表单类型扩展”来实现这一点,该扩展的文档在链接“”中给出