本文整理汇总了PHP中photo::get_edit_form方法的典型用法代码示例。如果您正苦于以下问题:PHP photo::get_edit_form方法的具体用法?PHP photo::get_edit_form怎么用?PHP photo::get_edit_form使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类photo
的用法示例。
在下文中一共展示了photo::get_edit_form方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: form_edit
public function form_edit($photo_id)
{
$photo = ORM::factory("item", $photo_id);
access::required("view", $photo);
access::required("edit", $photo);
print photo::get_edit_form($photo);
}
示例2: form_edit
public function form_edit($id)
{
$item = model_cache::get("item", $id);
access::required("view", $item);
access::required("edit", $item);
if ($item->is_album()) {
$form = album::get_edit_form($item);
} else {
$form = photo::get_edit_form($item);
}
print $form;
}
示例3: _form_edit
/**
* @see REST_Controller::_form_edit($resource)
*/
public function _form_edit($photo)
{
access::required("view", $photo);
access::required("edit", $photo);
print photo::get_edit_form($photo);
}
示例4: form_edit
public function form_edit($id)
{
$item = model_cache::get("item", $id);
access::required("view", $item);
access::required("edit", $item);
switch ($item->type) {
case "album":
$form = album::get_edit_form($item);
break;
case "photo":
$form = photo::get_edit_form($item);
break;
case "movie":
$form = movie::get_edit_form($item);
break;
}
// Pass on the source item where this form was generated, so we have an idea where to return to.
$form->hidden("from_id")->value((int) Input::instance()->get("from_id", 0));
print $form;
}
示例5: form_edit
public function form_edit($id)
{
$item = ORM::factory("item", $id);
access::required("edit", $item);
$form = photo::get_edit_form($item);
print $form;
}
示例6: form_edit
public function form_edit($id)
{
$item = model_cache::get("item", $id);
access::required("view", $item);
access::required("edit", $item);
switch ($item->type) {
case "album":
return print album::get_edit_form($item);
case "photo":
return print photo::get_edit_form($item);
case "movie":
return print movie::get_edit_form($item);
}
}
示例7: form_edit
public function form_edit($id)
{
$item = ORM::factory("item", $id);
access::required("edit", $item);
if ($item->is_album()) {
$form = album::get_edit_form($item);
} else {
$form = photo::get_edit_form($item);
}
print $form;
}