<?php

namespace ThurData\Servers\KerioEmail\App\UI\Client\DomainAlias\Forms;

use ThurData\Servers\KerioEmail\App\UI\Client\DomainAlias\Providers\DeleteDomainAliasProvider;
use ThurData\Servers\KerioEmail\Core\UI\Interfaces\ClientArea;
use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\BaseForm;
use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Hidden;
use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\FormConstants;

/**
 *
 * Created by PhpStorm.
 * User: ThurData
 * 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();

    }

}