本文整理汇总了PHP中Formo::instance方法的典型用法代码示例。如果您正苦于以下问题:PHP Formo::instance方法的具体用法?PHP Formo::instance怎么用?PHP Formo::instance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Formo
的用法示例。
在下文中一共展示了Formo::instance方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: blank
public function blank($element = '', $list = FALSE)
{
$form = Formo::instance($this->formo_name);
$list = !$list ? $element : $list;
$element = $list ? $element : Formo::$last_accessed;
if (!is_array($list)) {
$list = TRUE;
}
$form->{$this->name}->blank = $list;
}
示例2: check
public function check($group, $element = '')
{
$form = Formo::instance($this->formo_name);
if (is_object($form->{$group}) and get_class($form->{$group}) == 'Formo_Group') {
foreach (Formo::splitby($element) as $el) {
$form->{$group}->{$el}->checked = TRUE;
}
} else {
$form->{$group}->checked = TRUE;
}
}
示例3: type
public function type($new_type)
{
Formo::include_file('driver', $new_type);
$form = Formo::instance($this->formo_name);
$vals = get_object_vars($this);
unset($form->{$this->name});
unset($vals['type']);
unset($vals['tags']);
$form->add($new_type, $this->name, $vals);
return $this;
}
示例4: __construct
public function __construct($name = '', $info = array())
{
parent::__construct($name, $info);
$form = Formo::instance($this->formo_name);
$form->set('open', preg_replace('/>/', ' enctype="multipart/form-data">', $form->_open));
}