->setFormTypeOption('entry_type', FileManagerType::class) | ->setFormTypeOption('entry_type', FileManagerType::class) | ||||
->setFormTypeOption('attr', array('class'=> 'field-collection-group')) | ->setFormTypeOption('attr', array('class'=> 'field-collection-group')) | ||||
->setFormTypeOption('row_attr', array('data-sortable'=> true)) | ->setFormTypeOption('row_attr', array('data-sortable'=> true)) | ||||
->setCustomOption('managerDir', 'image') | |||||
->setCustomOption('type', 'image') | |||||
->hideOnIndex(); | ->hideOnIndex(); | ||||
//->setEntryType(FileManagerType::class); | //->setEntryType(FileManagerType::class); |
{% block file_manager_widget %} | {% block file_manager_widget %} | ||||
{% set managerDir = form.vars.ea_crud_form.ea_field.customOptions.get('managerDir') %} | |||||
{% set type = form.vars.ea_crud_form.ea_field.customOptions.get('type') %} | |||||
{% if form.vars.ea_crud_form.ea_field is not null %} | |||||
{% set managerDir = form.vars.ea_crud_form.ea_field.customOptions.get('managerDir') %} | |||||
{% set type = form.vars.ea_crud_form.ea_field.customOptions.get('type') %} | |||||
{% else %} | |||||
{% set managerDir = form.parent.vars.ea_crud_form.ea_field.customOptions.get('managerDir') %} | |||||
{% set type = form.parent.vars.ea_crud_form.ea_field.customOptions.get('type') %} | |||||
{% endif %} | |||||
<div class="lc-filemanager row"> | <div class="lc-filemanager row"> | ||||
{% if type == 'image' %} | {% if type == 'image' %} |