|
- <?php
-
- namespace Lc\CaracoleBundle\Definition;
-
- use Lc\SovBundle\Definition\AbstractSettingDefinition;
-
- class SectionSettingDefinition extends AbstractSettingDefinition
- {
- const CATEGORY_GENERAL = 'general';
-
- const SETTING_REFERENCE_PREFIX = 'orderReferencePrefix';
- const SETTING_ORDER_STATE = 'orderState';
- const SETTING_ORDER_CLOSED_START = 'orderClosedStart';
- const SETTING_ORDER_CLOSED_END = 'orderClosedEnd';
- const SETTING_ORDER_MAXIMUM_PER_CYCLE = 'orderMaximumPerCycle';
- /*const SETTING_COLOR_PRIMARY = 'colorPrimary';
- const SETTING_COLOR_SECONDARY = 'colorSecondary';*/
-
- const VALUE_ORDER_STATE_DEFAULT = 'default';
- const VALUE_ORDER_STATE_OPEN = 'open';
- const VALUE_ORDER_STATE_CLOSED = 'closed';
-
- public function __construct()
- {
- $this->addSettingText(
- [
- 'name' => self::SETTING_REFERENCE_PREFIX,
- 'category' => self::CATEGORY_GENERAL,
- ]
- );
-
- $this->addSettingSelect(
- [
- 'name' => self::SETTING_ORDER_STATE,
- 'category' => self::CATEGORY_GENERAL,
- 'choices' => [
- 'Suivant configuration ouvertures' => self::VALUE_ORDER_STATE_DEFAULT,
- 'Ouvertes' => self::VALUE_ORDER_STATE_OPEN,
- 'Fermées' => self::VALUE_ORDER_STATE_CLOSED,
- ],
- 'default' => self::VALUE_ORDER_STATE_DEFAULT
- ]
- );
-
- $this->addSettingDate(
- [
- 'name' => self::SETTING_ORDER_CLOSED_START,
- 'category' => self::CATEGORY_GENERAL,
- ]
- );
-
- $this->addSettingDate(
- [
- 'name' => self::SETTING_ORDER_CLOSED_END,
- 'category' => self::CATEGORY_GENERAL,
- ]
- );
-
- $this->addSettingText(
- [
- 'name' => self::SETTING_ORDER_MAXIMUM_PER_CYCLE,
- 'category' => self::CATEGORY_GENERAL,
- ]
- );
-
- /*$this->addSettingText(
- [
- 'name' => self::SETTING_COLOR_PRIMARY,
- 'category' => self::CATEGORY_GENERAL,
- ]
- );
- $this->addSettingText(
- [
- 'name' => self::SETTING_COLOR_SECONDARY,
- 'category' => self::CATEGORY_GENERAL,
- ]
- );*/
- }
-
- public function getCategories()
- {
- return [
- self::CATEGORY_GENERAL,
- ];
- }
-
- }
|