本文整理匯總了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);
}