|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?php
-
- namespace Lc\SovBundle\Definition;
-
-
- class SiteSettingDefinition extends AbstractSettingDefinition implements SiteSettingDefinitionInterface
- {
- const CATEGORY_GENERAL = 'general';
- const CATEGORY_EMAIL = 'email';
-
- const SETTING_MAINTENANCE = 'maintenance';
- const SETTING_MAINTENANCE_IP_AUTHORIZED = 'maintenanceIpAuthorized';
-
- const SETTING_EMAIL_SUBJECT_PREFIX = 'emailSubjectPrefix';
- const SETTING_EMAIL_FROM = 'emailFrom';
- const SETTING_EMAIL_FROM_NAME = 'emailFromName';
-
- public function __construct()
- {
- // général
- $this->addSettingSelect(
- [
- 'category' => self::CATEGORY_GENERAL,
- 'name' => self::SETTING_MAINTENANCE,
- 'choices' => [
- 'Non' => 0,
- 'Oui' => 1,
- ]
- ]
- );
-
- $this->addSettingText(
- [
- 'category' => self::CATEGORY_GENERAL,
- 'name' => self::SETTING_MAINTENANCE_IP_AUTHORIZED,
- ]
- );
-
-
- // email
- $this->addSettingText(
- [
- 'category' => self::CATEGORY_EMAIL,
- 'name' => self::SETTING_EMAIL_FROM,
- ]
- );
-
- $this->addSettingText(
- [
- 'category' => self::CATEGORY_EMAIL,
- 'name' => self::SETTING_EMAIL_FROM_NAME,
- ]
- );
- }
-
- public function getCategories()
- {
- return [
- self::CATEGORY_GENERAL,
- self::CATEGORY_EMAIL
- ];
- }
-
- }
|