<?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,
            ]
        );
    }

    public function getCategories(): array
    {
        return [
            self::CATEGORY_GENERAL,
        ];
    }

}