您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

41 行
1.0KB

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