本文整理汇总了PHP中HiddenField::render方法的典型用法代码示例。如果您正苦于以下问题:PHP HiddenField::render方法的具体用法?PHP HiddenField::render怎么用?PHP HiddenField::render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HiddenField
的用法示例。
在下文中一共展示了HiddenField::render方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
public function render()
{
$name = $this->getName();
$hidden = new HiddenField($name, $this->getValue());
$id = $this->getId();
$hidden->addAttribute("id", $id);
$ret = $hidden->render();
if ($this->storedFieldSet === false) {
$this->addSearchField($this->storedField);
$this->storedFieldSet = true;
}
$object = array("model" => $this->model->package, "format" => "json", "fields" => $this->searchFields, "limit" => 20, "conditions" => "", "and_conditions" => $this->andConditions);
$jsonSearchFields = array_reverse($this->searchFields);
$object = base64_encode(serialize($object));
$path = Application::$prefix . "/lib/models/urlaccess.php?object={$object}";
$fields = urlencode(json_encode($jsonSearchFields));
$text = new TextField();
$text->addAttribute("onkeyup", "fapiUpdateSearchField('{$id}','{$path}','{$fields}',this," . ($this->boldFirst ? "true" : "false") . ",'{$this->onChangeAttribute}')");
$text->addAttribute("autocomplete", "off");
if ($this->getValue() != "") {
$data = $this->model[$this->getValue()];
for ($i = 2; $i < count($jsonSearchFields); $i++) {
$val .= $data[0][$jsonSearchFields[$i]] . " ";
}
$text->setValue($val);
}
$text->setId($id . "_search_entry");
$ret .= $text->render();
$ret .= "<div class='fapi-popup' id='{$id}_search_area'></div>";
return $ret;
}