<?php

namespace ModulesGarden\Servers\OpenXchange\App\UI\Client\EmailForwarder\Forms;


use ModulesGarden\Servers\OpenXchange\App\UI\Client\EmailForwarder\Providers\DeleteForwarderDataProvider;
use ModulesGarden\Servers\OpenXchange\Core\UI\Interfaces\ClientArea;
use ModulesGarden\Servers\OpenXchange\Core\UI\Widget\Forms\BaseForm;
use ModulesGarden\Servers\OpenXchange\Core\UI\Widget\Forms\Fields\Hidden;
use ModulesGarden\Servers\OpenXchange\Core\UI\Widget\Forms\FormConstants;

/**
 *
 * Created by PhpStorm.
 * User: Tomasz Bielecki ( tomasz.bi@modulesgarden.com )
 * Date: 18.09.19
 * Time: 11:28
 * Class DeleteForwarderForm
 */
class DeleteForwarderForm extends BaseForm implements ClientArea
{
    protected $id    = 'deleteForwarderForm';
    protected $name  = 'deleteForwarderForm';
    protected $title = 'deleteForwarderForm';

    public function initContent()
    {
        $this->setFormType(FormConstants::DELETE);
        $this->dataProvider = new DeleteForwarderDataProvider();

        $this->setConfirmMessage('confirmRemoveForwarder');

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

        $this->loadDataToForm();
    }
}