You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 satır
2.9KB

  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_OPENING_TEXT_CLOSED = 'openingTextClosed';
  13. const VALUE_ORDER_STATE_DEFAULT = 'default';
  14. const VALUE_ORDER_STATE_OPEN = 'open';
  15. const VALUE_ORDER_STATE_CLOSED = 'closed';
  16. public function __construct()
  17. {
  18. $this->addSettingText(
  19. [
  20. 'name' => self::SETTING_REFERENCE_PREFIX,
  21. 'category' => self::CATEGORY_GENERAL,
  22. ]
  23. );
  24. $this->addSettingSelect(
  25. [
  26. 'name' => self::SETTING_ORDER_STATE,
  27. 'category' => self::CATEGORY_GENERAL,
  28. 'choices' => [
  29. 'Suivant configuration ouvertures' => self::VALUE_ORDER_STATE_DEFAULT,
  30. 'Ouvertes' => self::VALUE_ORDER_STATE_OPEN,
  31. 'Fermées' => self::VALUE_ORDER_STATE_CLOSED,
  32. ],
  33. 'default' => self::VALUE_ORDER_STATE_DEFAULT
  34. ]
  35. );
  36. $this->addSettingDate(
  37. [
  38. 'name' => self::SETTING_ORDER_CLOSED_START,
  39. 'category' => self::CATEGORY_GENERAL,
  40. ]
  41. );
  42. $this->addSettingDate(
  43. [
  44. 'name' => self::SETTING_ORDER_CLOSED_END,
  45. 'category' => self::CATEGORY_GENERAL,
  46. ]
  47. );
  48. $this->addSettingText(
  49. [
  50. 'category' => self::CATEGORY_GENERAL,
  51. 'name' => self::SETTING_OPENING_TEXT_CLOSED
  52. ]
  53. );
  54. $this->addSettingText(
  55. [
  56. 'name' => self::SETTING_ORDER_MAXIMUM_PER_CYCLE,
  57. 'category' => self::CATEGORY_GENERAL,
  58. ]
  59. );
  60. /*$this->addSettingText(
  61. [
  62. 'name' => self::SETTING_COLOR_PRIMARY,
  63. 'category' => self::CATEGORY_GENERAL,
  64. ]
  65. );
  66. $this->addSettingText(
  67. [
  68. 'name' => self::SETTING_COLOR_SECONDARY,
  69. 'category' => self::CATEGORY_GENERAL,
  70. ]
  71. );*/
  72. }
  73. public function getCategories()
  74. {
  75. return [
  76. self::CATEGORY_GENERAL,
  77. ];
  78. }
  79. }