Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

SectionSettingDefinition.php 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. }