本文整理汇总了PHP中Entity::render方法的典型用法代码示例。如果您正苦于以下问题:PHP Entity::render方法的具体用法?PHP Entity::render怎么用?PHP Entity::render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Entity
的用法示例。
在下文中一共展示了Entity::render方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
public function render()
{
$output = parent::render();
$output .= "<div class='form-element-wrapper'>";
if ($this->label && $this->attributes['id']) {
$output .= "<label for='" . o($this->attributes['id']) . "'>" . o($this->label) . ": </label>";
}
$output .= "<input" . $this->getAttributeString() . "/>";
$output .= "</div>";
return $output;
}
示例2: render
public function render()
{
$output = parent::render();
$output .= "<div class='form-element-wrapper'>";
if ($this->label && $this->attributes['id']) {
$output .= "<label for='" . o($this->attributes['id']) . "'>" . o($this->label) . ": </label>";
}
$output .= "<select" . $this->getAttributeString() . ">";
foreach ($this->options as $value => $option) {
$option = o($option);
$value = o($value);
if ($value == $this->selected_option) {
$output .= "<option selected value='{$value}'>{$option}</option>";
} else {
$output .= "<option value='{$value}'>{$option}</option>";
}
}
$output .= "</select>";
$output .= "</div>";
return $output;
}
示例3: render
public function render($view_file, $values = array())
{
global $currentUser;
return Entity::render($view_file, array_merge($values, array("avatar_url" => "/data/images/profiles/users/" . ($this['avatar'] ? $this['avatar'] : "default.png"), "parsed_message" => $this->getParsedMessage(), "parsed_signature" => Text::MessageToHtml($this['signature']), "view_profile_url" => "#", "formatted_post_date" => DateUtils::GetNice($this['post_date']), "edited" => $this['edit_by'] != '0', "edit_by" => $this['edit_by'], "edit_user" => $this['edit_user'], "edit_date" => DateUtils::GetNice($this['edit_date']), "is_mod" => $currentUser->isModOfForum($this['argument']), "can_edit" => $currentUser->isModOfForum($this['argument']) || $currentUser["id"] == $this['user_id'])));
}