当前位置: 首页>>代码示例>>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;未经允许,请勿转载。