当前位置: 首页>>代码示例>>PHP>>正文


PHP cmsCore::loadAllControllersLanguages方法代码示例

本文整理汇总了PHP中cmsCore::loadAllControllersLanguages方法的典型用法代码示例。如果您正苦于以下问题:PHP cmsCore::loadAllControllersLanguages方法的具体用法?PHP cmsCore::loadAllControllersLanguages怎么用?PHP cmsCore::loadAllControllersLanguages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cmsCore的用法示例。


在下文中一共展示了cmsCore::loadAllControllersLanguages方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: run

 public function run($id = false)
 {
     if (!$id) {
         cmsCore::error404();
     }
     $widgets_model = cmsCore::getModel('widgets');
     cmsCore::loadAllControllersLanguages();
     $page = $widgets_model->getPage($id);
     if (!$page) {
         cmsCore::error404();
     }
     $form = $this->getForm('widgets_page');
     if (!$page['is_custom']) {
         $form->removeField('title', 'title');
     }
     $is_submitted = $this->request->has('submit');
     if ($is_submitted) {
         $page = $form->parse($this->request, $is_submitted);
         $errors = $form->validate($this, $page);
         if (!$errors) {
             $widgets_model->updatePage($id, $page);
             $this->redirectToAction('widgets');
         }
         if ($errors) {
             cmsUser::addSessionMessage(LANG_FORM_ERRORS, 'error');
         }
     }
     return cmsTemplate::getInstance()->render('widgets_page', array('do' => 'edit', 'page' => $page, 'form' => $form, 'errors' => isset($errors) ? $errors : false));
 }
开发者ID:asphix,项目名称:icms2,代码行数:29,代码来源:widgets_page_edit.php

示例2: run

 public function run($do = false)
 {
     // если нужно, передаем управление другому экшену
     if ($do) {
         $this->runAction('widgets_' . $do, array_slice($this->params, 1));
         return;
     }
     cmsCore::loadAllControllersLanguages();
     $widgets_model = cmsCore::getModel('widgets');
     $controllers = $widgets_model->getPagesControllers();
     $widgets_list = $widgets_model->getAvailableWidgets();
     $template = cmsTemplate::getInstance();
     $scheme_html = $this->getSchemeHTML();
     return $template->render('widgets', array('controllers' => $controllers, 'widgets_list' => $widgets_list, 'scheme_html' => $scheme_html));
 }
开发者ID:asphix,项目名称:icms2,代码行数:15,代码来源:widgets.php

示例3: run

 public function run()
 {
     if (!$this->request->isAjax()) {
         cmsCore::error404();
     }
     cmsCore::loadAllControllersLanguages();
     $grid = $this->loadDataGrid('controllers');
     $this->model->setPerPage(admin::perpage);
     $filter = array();
     $filter_str = $this->request->get('filter', '');
     $filter_str = cmsUser::getUPSActual('admin.grid_filter.controllers', $filter_str);
     if ($filter_str) {
         parse_str($filter_str, $filter);
         $this->model->applyGridFilter($grid, $filter);
     }
     $total = $this->model->getInstalledControllersCount();
     $pages = ceil($total / admin::perpage);
     $controllers = $this->model->getInstalledControllers();
     cmsTemplate::getInstance()->renderGridRowsJSON($grid, $controllers, $total, $pages);
     $this->halt();
 }
开发者ID:Val-Git,项目名称:icms2,代码行数:21,代码来源:controllers_ajax.php

示例4: run

 public function run($do = false)
 {
     // если нужно, передаем управление другому экшену
     if ($do) {
         $this->runAction('widgets_' . $do, array_slice($this->params, 1));
         return;
     }
     cmsCore::loadAllControllersLanguages();
     $widgets_model = cmsCore::getModel('widgets');
     $controllers = $widgets_model->getPagesControllers();
     $widgets_list = $widgets_model->getAvailableWidgets();
     $tpls = cmsCore::getTemplates();
     $template_name = $this->request->get('template_name', '');
     if (!$template_name || !in_array($template_name, $tpls)) {
         $template_name = cmsConfig::get('template');
     }
     foreach ($tpls as $tpl) {
         $templates[$tpl] = $tpl;
     }
     $scheme_html = $this->getSchemeHTML($template_name);
     return $this->cms_template->render('widgets', array('controllers' => $controllers, 'template_name' => $template_name, 'templates' => $templates, 'widgets_list' => $widgets_list, 'scheme_html' => $scheme_html));
 }
开发者ID:uzunhair,项目名称:icms2,代码行数:22,代码来源:widgets.php


注:本文中的cmsCore::loadAllControllersLanguages方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。