<?php

namespace ModulesGarden\Servers\ZimbraEmail\App\UI\Client\DomainAlias\Forms;


use ModulesGarden\Servers\ZimbraEmail\App\UI\Client\DomainAlias\Providers\AddDomainAliasDataProvider;
use ModulesGarden\Servers\ZimbraEmail\App\UI\Client\DomainAlias\Providers\DeleteDomainAliasProvider;
use ModulesGarden\Servers\ZimbraEmail\Core\UI\Interfaces\ClientArea;
use ModulesGarden\Servers\ZimbraEmail\Core\UI\Widget\Forms\BaseForm;
use ModulesGarden\Servers\ZimbraEmail\Core\UI\Widget\Forms\Fields\Hidden;
use ModulesGarden\Servers\ZimbraEmail\Core\UI\Widget\Forms\FormConstants;

/**
 *
 * Created by PhpStorm.
 * User: Tomasz Bielecki ( tomasz.bi@modulesgarden.com )
 * Date: 02.10.19
 * Time: 14:32
 * Class DeleteDomainAliasForm
 */
class DeleteDomainAliasForm extends BaseForm implements ClientArea
{
    protected $id    = 'deleteDomainAliasForm';
    protected $name  = 'deleteDomainAliasForm';
    protected $title = 'deleteDomainAliasForm';

    public function initContent()
    {
        $this->setFormType(FormConstants::DELETE);
        $this->setProvider(new DeleteDomainAliasProvider());
        $this->setConfirmMessage('confirmRemoveDomainAlias');

        $field = new Hidden();
        $field->setId('id');
        $field->setName('id');
        $this->addField($field);

        $this->loadDataToForm();

    }

}