37 lines
718 B
PHP
37 lines
718 B
PHP
<?php
|
|
|
|
namespace App\Core\Form\FileManager;
|
|
|
|
use Symfony\Component\Form\AbstractType;
|
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
|
use Symfony\Component\Form\FormInterface;
|
|
use Symfony\Component\Form\FormView;
|
|
|
|
class FilePickerType extends AbstractType
|
|
{
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function buildView(FormView $view, FormInterface $form, array $options)
|
|
{
|
|
$view->vars['pattern'] = null;
|
|
unset($view->vars['attr']['pattern']);
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function getParent()
|
|
{
|
|
return TextType::class;
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function getBlockPrefix()
|
|
{
|
|
return 'file_picker';
|
|
}
|
|
}
|