<?php

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


use ModulesGarden\Servers\ZimbraEmail\App\UI\Client\Ressource\Providers\DeleteRessourceDataProvider;
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: 18.09.19
 * Time: 11:28
 * Class DeleteRessourceForm
 */
class DeleteRessourceForm extends BaseForm implements ClientArea
{
    protected $id    = 'deleteRessourceForm';
    protected $name  = 'deleteRessourceForm';
    protected $title = 'deleteRessourceForm';

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

        $this->setConfirmMessage('confirmRemoveRessource');

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

        $this->loadDataToForm();
    }
}