Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

47 lines
1.2KB

  1. <?php
  2. namespace Lc\SovBundle\Definition;
  3. class SiteSettingDefinition extends AbstractSettingDefinition implements SiteSettingDefinitionInterface
  4. {
  5. const CATEGORY_GENERAL = 'general';
  6. const CATEGORY_EMAIL = 'email';
  7. const SETTING_MAINTENANCE = 'maintenance';
  8. const SETTING_MAINTENANCE_IP_AUTHORIZED = 'maintenanceIpAuthorized';
  9. const SETTING_EMAIL_SUBJECT_PREFIX = 'emailSubjectPrefix';
  10. const SETTING_EMAIL_FROM = 'emailFrom';
  11. const SETTING_EMAIL_FROM_NAME = 'emailFromName';
  12. public function __construct()
  13. {
  14. // général
  15. $this->addSettingSelect(
  16. [
  17. 'category' => self::CATEGORY_GENERAL,
  18. 'name' => self::SETTING_MAINTENANCE,
  19. 'choices' => [
  20. 'Non' => 0,
  21. 'Oui' => 1,
  22. ]
  23. ]
  24. );
  25. $this->addSettingText(
  26. [
  27. 'category' => self::CATEGORY_GENERAL,
  28. 'name' => self::SETTING_MAINTENANCE_IP_AUTHORIZED,
  29. ]
  30. );
  31. }
  32. public function getCategories(): array
  33. {
  34. return [
  35. self::CATEGORY_GENERAL,
  36. ];
  37. }
  38. }