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.

SiteSettingDefinition.php 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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()
  33. {
  34. return [
  35. self::CATEGORY_GENERAL,
  36. ];
  37. }
  38. }