/** @deprecated */ protected static function exportRules($rules) { trigger_error(__METHOD__ . '() is deprecated; use Nette\\Forms\\Helpers::exportRules() instead.', E_USER_DEPRECATED); return Nette\Forms\Helpers::exportRules($rules); }
/** * Generates control's HTML element. * @return Html|string */ public function getControl() { $this->setOption('rendered', TRUE); $el = clone $this->control; return $el->addAttributes(['name' => $this->getHtmlName(), 'id' => $this->getHtmlId(), 'required' => $this->isRequired(), 'disabled' => $this->isDisabled(), 'data-nette-rules' => Nette\Forms\Helpers::exportRules($this->rules) ?: NULL]); }
/** * Generates control's HTML element. */ public function getControl() { $name = $this->getHtmlName(); return Html::el('input', ['name' => $name . '[day]', 'id' => $this->getHtmlId(), 'value' => $this->day, 'type' => 'number', 'min' => 1, 'max' => 31, 'data-nette-rules' => Helpers::exportRules($this->getRules()) ?: NULL]) . Helpers::createSelectBox([1 => 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], ['selected?' => $this->month])->name($name . '[month]') . Html::el('input', ['name' => $name . '[year]', 'value' => $this->year, 'type' => 'number']); }