<?php

namespace ThurData\Servers\KerioEmail\App\UI\Admin\LoggerManager\Forms;

use ThurData\Servers\KerioEmail\Core\UI\Interfaces\AdminArea;
use \ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\BaseForm;
use \ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Hidden;

use \ThurData\Servers\KerioEmail\App\UI\Admin\LoggerManager\Providers\LoggerDataProvider;
/**
 * DOE DeleteLabelForm controler
 *
 * @autor ThurData <info@thurdata.ch>
 */
class DeleteAllLoggerForm extends BaseForm implements AdminArea
{
    protected $id    = 'deleteAllLoggerForm';
    protected $name  = 'deleteAllLoggerForm';
    protected $title = 'deleteAllLoggerForm';

    public function initContent()
    {
        $this->setFormType('deleteall');
        $this->dataProvider = new LoggerDataProvider();

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

        $this->loadDataToForm();
    }
    
    protected function getDefaultActions()
    {
        return array_merge(parent::getDefaultActions(), ['deleteall']);
    }
}
