本文整理汇总了PHP中Nette\Forms\Helpers::exportRules方法的典型用法代码示例。如果您正苦于以下问题:PHP Helpers::exportRules方法的具体用法?PHP Helpers::exportRules怎么用?PHP Helpers::exportRules使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Nette\Forms\Helpers
的用法示例。
在下文中一共展示了Helpers::exportRules方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: exportRules
/** @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);
}
示例2: getControl
/**
* 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]);
}
示例3: getControl
/**
* 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']);
}