mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
set 'enabled' key to a constant
As this key is reused in other bundle, it is safer to hold the key in a constant
This commit is contained in:
parent
d90248349d
commit
9d1e414e79
@ -38,6 +38,8 @@ class FilterType extends AbstractType
|
||||
*/
|
||||
private $exportManager;
|
||||
|
||||
const ENABLED_FIELD = 'enabled';
|
||||
|
||||
public function __construct(ExportManager $exportManager)
|
||||
{
|
||||
$this->exportManager = $exportManager;
|
||||
@ -48,7 +50,7 @@ class FilterType extends AbstractType
|
||||
$filter = $this->exportManager->getFilter($options['filter_alias']);
|
||||
|
||||
$builder
|
||||
->add('enabled', CheckboxType::class, array(
|
||||
->add(self::ENABLED_FIELD, CheckboxType::class, array(
|
||||
'value' => true,
|
||||
'data' => false,
|
||||
'required' => false
|
||||
|
Loading…
x
Reference in New Issue
Block a user