Мне нужно подключиться к изображениям с помощью представления, но
у меня возникла ошибка: невозможно преобразовать в _string !!!
Код: Выделить всё
enter code here
Код: Выделить всё
$showMapper
->with('PRODUCT DESCRIPTION', array('class' => 'col-md-7'))
->add('name')
->add('country')
->add('descriptionshortnat', null, array('label' => 'Description short (national)'))
->add('descriptionlongnat', null, array('label' => 'Description long (national)'))
->add('descriptionshorten', null, array('label' => 'Description short (english)'))
->add('descriptionlongen', null, array('label' => 'Description long (english)'))
->add('created')
->add('updated')
->end()
->with('PICTURES', array('class' => 'col-md-5'))
->add('image', 'string' , array("template"=>"AdminBundle::Admin/list_types/image10.html.twig"))
->end()
Код: Выделить всё
{% extends 'SonataAdminBundle:CRUD:base_list_field.html.twig' %}
{% block field %}
[url={{ asset(]
[img]{{ asset([/img]
[/url]
{% endblock %}
Код: Выделить всё
Подробнее здесь: [url]https://stackoverflow.com/questions/44065146/symfony-sonata-object-to-string[/url]