mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +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;
|
private $exportManager;
|
||||||
|
|
||||||
|
const ENABLED_FIELD = 'enabled';
|
||||||
|
|
||||||
public function __construct(ExportManager $exportManager)
|
public function __construct(ExportManager $exportManager)
|
||||||
{
|
{
|
||||||
$this->exportManager = $exportManager;
|
$this->exportManager = $exportManager;
|
||||||
@ -48,7 +50,7 @@ class FilterType extends AbstractType
|
|||||||
$filter = $this->exportManager->getFilter($options['filter_alias']);
|
$filter = $this->exportManager->getFilter($options['filter_alias']);
|
||||||
|
|
||||||
$builder
|
$builder
|
||||||
->add('enabled', CheckboxType::class, array(
|
->add(self::ENABLED_FIELD, CheckboxType::class, array(
|
||||||
'value' => true,
|
'value' => true,
|
||||||
'data' => false,
|
'data' => false,
|
||||||
'required' => false
|
'required' => false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user