/** * @param string $label * @return Forms\Controls\DatePicker */ public function __construct($label = NULL) { parent::__construct($label); $this->addCondition(Form::FILLED)->addRule(function ($control) { return $control->getValue() instanceof DateTime; }, 'brosland.forms.datePicker.invalidDate'); }
/** * Constructor * * @param string * @param array */ public function __construct($label = NULL, array $items = NULL) { parent::__construct($label); if ($items !== NULL) { $this->setItems($items); } }
/** * @param RepositoryContainer $orm * @param NULL|bool $editable */ public function __construct(RepositoryContainer $orm, $editable = FALSE) { $this->orm = $orm; parent::__construct(NULL); $this->setTranslator(NULL); $this->editable = $editable; }
/** * @param string|Html $label * @param int null $cols * @param int null $maxLength * @param string $msg */ public function __construct($label = '', $cols = NULL, $maxLength = NULL, $msg = '') { parent::__construct($label, $cols, $maxLength); $this->setDefaultValue('Toto pole vymažte (antispam)'); $this->setAttribute('class', 'form-control input-lg'); $this->addRule(Form::BLANK, $msg); }
/** * @param string|null $label */ public function __construct($label = NULL) { parent::__construct($label); $this->filtersOut[] = $this->sanitize; $this->filtersOut[] = $this->unformat; $this->filtersIn[] = $this->format; $this->value = NULL; }
function __construct($label = NULL, $maxLength = NULL) { parent::__construct($label, $maxLength); $this->setType('password'); $this->control->addClass('form-control'); $this->setOption('noFormControl', TRUE); $addMethod = (new \ReflectionClass(Html::class))->hasMethod('addHtml') ? 'addHtml' : 'add'; $this->fullControl = Html::el('span')->addClass('input-group')->{$addMethod}('<span class="input-group-btn"><span class="btn btn-default"><i class="glyphicon glyphicon-eye-open"></i></span></span>')->addAttributes(['data-instante-displayable-password' => TRUE]); }
/** * @param string $label * @param string $dateFormat */ public function __construct($label, $dateFormat) { parent::__construct($label); $this->dateFormat = $dateFormat; $this->controlPrototype->{'data-date-format'} = DateMacro::phpToJsDateFormat($dateFormat); $this->addRule(function () { return empty($this->rawValue) || $this->getValue() instanceof \DateTime; }, 'Please enter the date in the correct format. Eg . 02/22/2020 02:22 PM'); }
public function __construct($label = NULL, $type) { if (!isset($this->aFormats[$type])) { throw new \InvalidArgumentException("addDate: invalid date type '{$type}' given."); } parent::__construct($label); $this->type = $type; $this->control->addClass('nette-date-time'); $this->control->data('dateinput-type', $type); }
public function __construct($caption = NULL, $callback = NULL) { parent::__construct($caption); $this->setCallback($callback); }
/** * @param callback $callback * @param string $label * @param int $maxLength */ public function __construct($callback = NULL, $label = NULL, $maxLength = NULL) { parent::__construct($label, $maxLength); $this->callback = $callback; $this->monitor('Nette\\Application\\IPresenter'); }
/** * Initialization * * @param string $label label * @param int $maxLength maximum count of chars */ public function __construct($label = NULL, $maxLength = NULL) { parent::__construct($label, $maxLength); }
public function __construct($caption = null, $callback = null) { parent::__construct($caption); $this->setCallback($callback); }
/** * Construct a textinput and set suggestLink and suggester * * @param string|NULL $label The textual label of the control * @param string|NULL $suggestLink Link to the page that returns * suggested items * @param ISuggester|NULL $suggester The suggester of items * @param int|NULL $cols If not null, declares the width of * the input in number of chars that * fit into * @param int|NULL $maxLength If not null, declares the maximal * length of the typed text * @return void */ public function __construct($label = NULL, $suggestLink = NULL, SuggestInput\ISuggester $suggester = NULL, $cols = NULL, $maxLength = NULL) { parent::__construct($label, $cols, $maxLength); $this->suggestLink = $suggestLink; $this->suggester = $suggester; }
/** * @param string $label label * @param string $format */ public function __construct($label = null, $format = 'd.m.Y H:i') { parent::__construct($label, null); $this->container = Html::el("div"); $this->format = $format; }
public function __construct($label = null, $cols = null, $maxLength = null) { $this->container = Html::el(); $this->prompt = true; parent::__construct($label, $cols, $maxLength); }
/** * @param string|NULL $caption * @param IDateTimeConverter $dateConverter */ public function __construct($caption, IDateTimeConverter $dateConverter) { parent::__construct($caption); $this->dateConverter = $dateConverter; }
/** * @param string $label * @param int $maxLength */ public function __construct($label, $maxLength = 5) { parent::__construct($label, $maxLength); $this->control->addClass('captcha-input seznam-captcha-input'); }
/** * @param string $caption * @param string $format * @throws \Exception */ public function __construct($caption = NULL, $format = NULL) { parent::__construct($caption); $this->setFormat($format ?: self::$dateFormat); }
/** * @param PhoneUtils $phoneUtils * @param string|NULL $label * @param int|NULL $maxLength */ public function __construct(PhoneUtils $phoneUtils, $label = NULL, $maxLength = NULL) { parent::__construct($label, $maxLength); $this->phoneUtils = $phoneUtils; }
public function __construct($label = NULL, $formatUI = 'd.m.yy', $format = 'j.n.Y') { parent::__construct($label); $this->format = $format; $this->formatUi = $formatUI; }
/** * @param string $label * @param int $maxLength maximum number of characters the user may enter */ public function __construct($label = NULL, $maxLength = NULL) { parent::__construct($label, $maxLength); $this->setType('password'); $this->container = Html::el(); }
/** * @param string label * @param int maximum number of characters the user may enter */ public function __construct($label = null) { parent::__construct($label, 10); //$this->control->type = 'date'; }
/** * @inheritdoc */ public function __construct(DataSourceDescriptor $dataSourceDescriptor, $label = NULL, $maxLength = NULL) { parent::__construct($label, $maxLength); $this->dataSourceDescriptor = $dataSourceDescriptor; }
/** * @param string|Html * @param int * @param int * @param string */ public function __construct($label = '', $cols = NULL, $maxLength = NULL, $msg = '') { parent::__construct($label, $cols, $maxLength); $this->setDefaultValue('http://'); $this->addRule(Form::BLANK, $msg); }
public function __construct($label = NULL, $multiple = false, $imageOnly = true) { parent::__construct($label); $this->imageOnly = $imageOnly; $this->multiple = $multiple; }