本文整理汇总了PHP中float::render方法的典型用法代码示例。如果您正苦于以下问题:PHP float::render方法的具体用法?PHP float::render怎么用?PHP float::render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类float
的用法示例。
在下文中一共展示了float::render方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render_field
/**
* render_field hook
* @param cs_form $form form object
* @return string the element html
*/
public function render_field(cs_form $form)
{
$id = $this->get_html_id();
$attributes = $this->get_attributes();
$this->tag = 'div';
$output = "<{$this->tag} id=\"{$id}\"{$attributes}>\n";
$required = $this->validate->has_value('required') ? '<span class="required">*</span>' : '';
$requiredafter = $requiredbefore = $required;
if ($this->required_position == 'before') {
$requiredafter = '';
$requiredbefore = $requiredbefore . ' ';
} else {
$requiredbefore = '';
$requiredafter = ' ' . $requiredafter;
}
if (!empty($this->title)) {
if ($this->tooltip == FALSE) {
$this->label_class .= " " . preg_replace("/cs_/i", "label-", get_class($this));
$this->label_class = trim($this->label_class);
$label_class = !empty($this->label_class) ? " class=\"{$this->label_class}\"" : "";
$output .= "<label for=\"{$id}\"{$label_class}>{$requiredbefore}" . $this->get_text($this->title) . "{$requiredafter}</label>\n";
} else {
if (!in_array('title', array_keys($this->attributes))) {
$this->attributes['title'] = strip_tags($this->get_text($this->title) . $required);
}
$id = $this->get_html_id();
$form->add_js("\$('#{$id}','#{$form->get_id()}').tooltip();");
}
}
$output .= $this->latitude->render($form);
$output .= $this->longitude->render($form);
$output .= "</{$this->tag}>\n";
return $output;
}