$datagridMapper->add(
'roles',
CallbackFilter::class,
[
'operator_type' => ChoiceType::class,
'callback' => [$this, 'filterByRoles'],
'operator_options' => [
'choices'=> [
"contains" => 1,
"not contains" => 2,
"is equals to" => 3,
],
],
],
ChoiceType::class,
[
'choices' => [
'USER' => 'ROLE_USER',
'ADMIN' => 'ROLE_ADMIN',
'SUPPORTER' => 'ROLE_SUPPORTER',
'COPYWRITER' => 'ROLE_COPYWRITER',
'SUPER_ADMIN' => 'ROLE_SUPER_ADMIN',
],
'multiple' => true,
]
);