當前位置: 首頁>>代碼示例>>PHP>>正文


PHP theme::get_edit_form_admin方法代碼示例

本文整理匯總了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;
     }
 }
開發者ID:brocki,項目名稱:gallery3,代碼行數:31,代碼來源:admin_theme_options.php

示例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;
     }
 }
開發者ID:Juuro,項目名稱:Dreamapp-Website,代碼行數:15,代碼來源:admin_theme_details.php


注:本文中的theme::get_edit_form_admin方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。