本文整理汇总了PHP中comment::get_add_form方法的典型用法代码示例。如果您正苦于以下问题:PHP comment::get_add_form方法的具体用法?PHP comment::get_add_form怎么用?PHP comment::get_add_form使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类comment
的用法示例。
在下文中一共展示了comment::get_add_form方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: form_add
/**
* Present a form for adding a new comment to this item or editing an existing comment.
*/
public function form_add($item_id)
{
$item = ORM::factory("item", $item_id);
access::required("view", $item);
if (!comment::can_comment()) {
access::forbidden();
}
print comment::prefill_add_form(comment::get_add_form($item));
}
示例2: photo_bottom
static function photo_bottom($theme)
{
$block = new Block();
$block->css_id = "gComments";
$block->title = t("Comments");
$view = new View("comments.html");
$view->comments = ORM::factory("comment")->where("item_id", $theme->item()->id)->where("state", "published")->orderby("created", "ASC")->find_all();
$block->content = $view;
$block->content .= comment::get_add_form($theme->item())->render("form.html");
return $block;
}
示例3: _form_add
/**
* Present a form for adding a new comment to this item or editing an existing comment.
* @see REST_Controller::form_add($resource)
*/
public function _form_add($item_id)
{
$item = ORM::factory("item", $item_id);
access::required("view", $item);
print comment::get_add_form($item);
}