本文整理汇总了PHP中theme::get_edit_form_admin方法的典型用法代码示例。如果您正苦于以下问题:PHP theme::get_edit_form_admin方法的具体用法?PHP theme::get_edit_form_admin怎么用?PHP theme::get_edit_form_admin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类theme
的用法示例。
在下文中一共展示了theme::get_edit_form_admin方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: save
public function save()
{
access::verify_csrf();
$form = theme::get_edit_form_admin();
if ($form->validate()) {
module::set_var("gallery", "page_size", $form->edit_theme->page_size->value);
$thumb_size = $form->edit_theme->thumb_size->value;
$thumb_dirty = false;
if (module::get_var("gallery", "thumb_size") != $thumb_size) {
graphics::remove_rule("gallery", "thumb", "gallery_graphics::resize");
graphics::add_rule("gallery", "thumb", "gallery_graphics::resize", array("width" => $thumb_size, "height" => $thumb_size, "master" => Image::AUTO), 100);
module::set_var("gallery", "thumb_size", $thumb_size);
}
$resize_size = $form->edit_theme->resize_size->value;
$resize_dirty = false;
if (module::get_var("gallery", "resize_size") != $resize_size) {
graphics::remove_rule("gallery", "resize", "gallery_graphics::resize");
graphics::add_rule("gallery", "resize", "gallery_graphics::resize", array("width" => $resize_size, "height" => $resize_size, "master" => Image::AUTO), 100);
module::set_var("gallery", "resize_size", $resize_size);
}
module::set_var("gallery", "header_text", $form->edit_theme->header_text->value);
module::set_var("gallery", "footer_text", $form->edit_theme->footer_text->value);
module::set_var("gallery", "show_credits", $form->edit_theme->show_credits->value);
message::success(t("Updated theme details"));
url::redirect("admin/theme_options");
} else {
$view = new Admin_View("admin.html");
$view->content = $form;
print $view;
}
}
示例2: save
public function save()
{
$form = theme::get_edit_form_admin();
if ($form->validate()) {
module::set_var("core", "page_size", $form->edit_theme->page_size->value);
module::set_var("core", "thumb_size", $form->edit_theme->thumb_size->value);
module::set_var("core", "resize_size", $form->edit_theme->resize_size->value);
message::success(t("Updated theme details"));
url::redirect("admin/theme_details");
} else {
$view = new Admin_View("admin.html");
$view->content = $form;
print $view;
}
}