<?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 AddOwnersDistribuition
 * User: ThurData
 * Date: 2019-09-20
 * Time: 12:43
 */

class AddOwnersDistribution extends FreeFieldsSection
{
    protected $id   = 'addOwnersDistribution';
    protected $name = 'addOwnersDistribution';

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

    }
}