<?php
namespace ThurData\Servers\KerioEmail\App\UI\Client\DistributionList\Sections;

use ThurData\Servers\KerioEmail\App\UI\Admin\Custom\Sections\FreeFieldsSection;
use ThurData\Servers\KerioEmail\App\Validators\TaggerEmailValidator;
use function ThurData\Servers\KerioEmail\Core\Helper\di;
use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Tagger;
/**
 * Class AddAliasesDistribution
 * User: ThurData
 * Date: 2019-09-20
 * Time: 12:43
 */

class AddAliasesDistribution extends FreeFieldsSection
{
    protected $id   = 'addAliasesDistribution';
    protected $name = 'addAliasesDistribution';

    public function initContent()
    {
        $this->addField(
            (new Tagger('emailAliases'))
            ->setPlaceholder(di('lang')->absoluteT('mail@example.com'))
            ->addValidator(new TaggerEmailValidator())
        );
    }
}