From 9d1e414e795a6d9d371b1eba6613e5a8141b0a08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 16 Jan 2017 13:14:10 +0100 Subject: [PATCH] set 'enabled' key to a constant As this key is reused in other bundle, it is safer to hold the key in a constant --- Form/Type/Export/FilterType.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Form/Type/Export/FilterType.php b/Form/Type/Export/FilterType.php index 50a73f08e..4e8a10e2d 100644 --- a/Form/Type/Export/FilterType.php +++ b/Form/Type/Export/FilterType.php @@ -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