<?php
namespace ModulesGarden\Servers\ZimbraEmail\App\UI\Admin\ProductConfiguration\Pages;

use ModulesGarden\Servers\ZimbraEmail\App\UI\Admin\ProductConfiguration\Pages\Sections\CalendarFeatures;
use ModulesGarden\Servers\ZimbraEmail\App\UI\Admin\ProductConfiguration\Pages\Sections\ClassOfServiceFeatures;
use ModulesGarden\Servers\ZimbraEmail\App\UI\Admin\ProductConfiguration\Pages\Sections\ClientAreaFeatures;
use ModulesGarden\Servers\ZimbraEmail\App\UI\Admin\ProductConfiguration\Pages\Sections\ConfigurableOptions;
use ModulesGarden\Servers\ZimbraEmail\App\UI\Admin\ProductConfiguration\Pages\Sections\ContactFeatures;
use ModulesGarden\Servers\ZimbraEmail\App\UI\Admin\ProductConfiguration\Pages\Sections\EssentialFeatures;
use ModulesGarden\Servers\ZimbraEmail\App\UI\Admin\ProductConfiguration\Pages\Sections\GeneralFeatures;
use ModulesGarden\Servers\ZimbraEmail\App\UI\Admin\ProductConfiguration\Pages\Sections\MailServiceFeatures;
use ModulesGarden\Servers\ZimbraEmail\App\UI\Admin\ProductConfiguration\Pages\Sections\MimeFeatures;
use ModulesGarden\Servers\ZimbraEmail\App\UI\Admin\ProductConfiguration\Pages\Sections\SearchFeatures;
use ModulesGarden\Servers\ZimbraEmail\App\UI\Admin\ProductConfiguration\Pages\Sections\ZimbraSettings;
use ModulesGarden\Servers\ZimbraEmail\App\UI\Admin\ProductConfiguration\Providers\ProductConfigurationDataProvider;
use ModulesGarden\Servers\ZimbraEmail\Core\UI\Interfaces\AdminArea;
use ModulesGarden\Servers\ZimbraEmail\Core\UI\Widget\Forms\FormIntegration;

/**
 *
 * Created by PhpStorm.
 * User: Tomasz Bielecki ( tomasz.bi@modulesgarden.com )
 * Date: 28.08.19
 * Time: 09:12
 * Class ConfigForm
 */
class ConfigForm extends FormIntegration implements AdminArea
{
    protected $id    = 'configForm';
    protected $name  = 'configForm';
    protected $title = 'configForm';

    public function initContent()
    {
        /** add data provider **/
        $this->setProvider(new ProductConfigurationDataProvider());

        /** zimbra setting section **/
        $this->addSection(new ZimbraSettings());

        /** essential features section **/
        $this->addSection(new EssentialFeatures());

        /** general features section **/
        $this->addSection(new GeneralFeatures());

        /** mail service features section **/
        $this->addSection(new MailServiceFeatures());

        /** contact features section **/
        $this->addSection(new ContactFeatures());

        /** calendar features section **/
        $this->addSection(new CalendarFeatures());

        /** search features section **/
        $this->addSection(new SearchFeatures());

        /** search features section **/
        $this->addSection(new MimeFeatures());

        /** class of service features section **/
        $this->addSection(new ClassOfServiceFeatures());

        /** available features in ca **/
        $this->addSection(new ClientAreaFeatures());

        /** configurable option section**/
        $this->addSection(new ConfigurableOptions());

        $this->loadDataToForm();
    }

}