Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

SectionSettingDefinition.php 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. namespace Lc\CaracoleBundle\Definition;
  3. use Lc\SovBundle\Definition\AbstractSettingDefinition;
  4. class SectionSettingDefinition extends AbstractSettingDefinition
  5. {
  6. const CATEGORY_GENERAL = 'general';
  7. const SETTING_REFERENCE_PREFIX = 'orderReferencePrefix';
  8. const SETTING_ORDER_STATE = 'orderState';
  9. const SETTING_ORDER_CLOSED_START = 'orderClosedStart';
  10. const SETTING_ORDER_CLOSED_END = 'orderClosedEnd';
  11. const SETTING_ORDER_MAXIMUM_PER_CYCLE = 'orderMaximumPerCycle';
  12. /*const SETTING_COLOR_PRIMARY = 'colorPrimary';
  13. const SETTING_COLOR_SECONDARY = 'colorSecondary';*/
  14. const VALUE_ORDER_STATE_DEFAULT = 'default';
  15. const VALUE_ORDER_STATE_OPEN = 'open';
  16. const VALUE_ORDER_STATE_CLOSED = 'closed';
  17. public function __construct()
  18. {
  19. $this->addSettingText(
  20. [
  21. 'name' => self::SETTING_REFERENCE_PREFIX,
  22. 'category' => self::CATEGORY_GENERAL,
  23. ]
  24. );
  25. $this->addSettingSelect(
  26. [
  27. 'name' => self::SETTING_ORDER_STATE,
  28. 'category' => self::CATEGORY_GENERAL,
  29. 'choices' => [
  30. 'Suivant configuration ouvertures' => self::VALUE_ORDER_STATE_DEFAULT,
  31. 'Ouvertes' => self::VALUE_ORDER_STATE_OPEN,
  32. 'Fermées' => self::VALUE_ORDER_STATE_CLOSED,
  33. ],
  34. 'default' => self::VALUE_ORDER_STATE_DEFAULT
  35. ]
  36. );
  37. $this->addSettingDate(
  38. [
  39. 'name' => self::SETTING_ORDER_CLOSED_START,
  40. 'category' => self::CATEGORY_GENERAL,
  41. ]
  42. );
  43. $this->addSettingDate(
  44. [
  45. 'name' => self::SETTING_ORDER_CLOSED_END,
  46. 'category' => self::CATEGORY_GENERAL,
  47. ]
  48. );
  49. $this->addSettingText(
  50. [
  51. 'name' => self::SETTING_ORDER_MAXIMUM_PER_CYCLE,
  52. 'category' => self::CATEGORY_GENERAL,
  53. ]
  54. );
  55. /*$this->addSettingText(
  56. [
  57. 'name' => self::SETTING_COLOR_PRIMARY,
  58. 'category' => self::CATEGORY_GENERAL,
  59. ]
  60. );
  61. $this->addSettingText(
  62. [
  63. 'name' => self::SETTING_COLOR_SECONDARY,
  64. 'category' => self::CATEGORY_GENERAL,
  65. ]
  66. );*/
  67. }
  68. public function getCategories()
  69. {
  70. return [
  71. self::CATEGORY_GENERAL,
  72. ];
  73. }
  74. }