public function __construct($label = NULL, $multiple = FALSE)
{
parent::__construct($label);
$this->control->type = 'file';
$this->control->multiple = (bool) $multiple;
$this->setOption('type', 'file');
$this->addCondition(Forms\Form::FILLED)->addRule([$this, 'isOk'], Forms\Validator::$messages[self::VALID]);
}
/** * @param string $label */ public function __construct($label = NULL) { parent::__construct($label, FALSE); $this->addCondition(Form::FILLED)->addRule(Form::IMAGE)->endCondition(); $this->monitor(IPresenter::class); $this->checkbox = new Checkbox(); }