Release 2.0.34 (#4281)
This commit is contained in:
@@ -16,6 +16,8 @@ use App\Repository\UserRepository;
|
||||
use App\Utils\Color;
|
||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\Form\FormView;
|
||||
use Symfony\Component\OptionsResolver\Options;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
@@ -65,10 +67,6 @@ final class UserType extends AbstractType
|
||||
'type' => 'integer',
|
||||
'description' => 'User ID',
|
||||
],
|
||||
'attr' => [
|
||||
'data-select-attributes' => 'color,title,username,initials,accountNumber,alias',
|
||||
'data-renderer' => 'color',
|
||||
],
|
||||
]);
|
||||
|
||||
$resolver->setDefault('query_builder', function (Options $options) {
|
||||
@@ -93,6 +91,14 @@ final class UserType extends AbstractType
|
||||
});
|
||||
}
|
||||
|
||||
public function buildView(FormView $view, FormInterface $form, array $options): void
|
||||
{
|
||||
$view->vars['attr'] = array_merge($view->vars['attr'], [
|
||||
'data-select-attributes' => 'color,title,username,initials,accountNumber,alias',
|
||||
'data-renderer' => 'color',
|
||||
]);
|
||||
}
|
||||
|
||||
public function getParent(): string
|
||||
{
|
||||
return EntityType::class;
|
||||
|
||||
Reference in New Issue
Block a user