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


PHP ViewManager::disableCaching方法代码示例

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


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

示例1: generateView

 /**
  * Generates plugin page options markup - Calls parent::generateView()
  *
  * @return str view markup
  */
 protected function generateView()
 {
     // if we have some p[lugin option elements defined
     // render them and add to the parent view...
     if (count($this->option_elements) > 0) {
         $this->setValues();
         $view_mgr = new ViewManager();
         $view_mgr->disableCaching();
         // assign data
         $view_mgr->assign('option_elements', $this->option_elements);
         $view_mgr->assign('option_elements_json', json_encode($this->option_elements));
         $view_mgr->assign('option_headers', $this->option_headers);
         $view_mgr->assign('option_not_required', $this->option_not_required);
         $view_mgr->assign('option_not_required_json', json_encode($this->option_not_required));
         $view_mgr->assign('option_required_message', $this->option_required_message);
         $view_mgr->assign('option_required_message_json', json_encode($this->option_required_message));
         $view_mgr->assign('option_select_multiple', $this->option_select_multiple);
         $view_mgr->assign('option_select_visible', $this->option_select_visible);
         $view_mgr->assign('plugin_id', $this->plugin_id);
         $view_mgr->assign('user_is_admin', $this->isAdmin());
         $options_markup = '';
         if ($this->profiler_enabled) {
             $view_start_time = microtime(true);
             $options_markup = $view_mgr->fetch(self::OPTIONS_TEMPLATE);
             $view_end_time = microtime(true);
             $total_time = $view_end_time - $view_start_time;
             $profiler = Profiler::getInstance();
             $profiler->add($total_time, "Rendered view (not cached)", false);
         } else {
             $options_markup = $view_mgr->fetch(self::OPTIONS_TEMPLATE);
         }
         $this->addToView('options_markup', $options_markup);
     }
     return parent::generateView();
 }
开发者ID:JWFoxJr,项目名称:ThinkUp,代码行数:40,代码来源:class.PluginConfigurationController.php

示例2: disableCaching

 /**
  * Turn off caching
  * Provided in case an individual controller wants to override the application-wide setting.
  */
 protected function disableCaching()
 {
     $this->view_mgr->disableCaching();
 }
开发者ID:dgw,项目名称:ThinkUp,代码行数:8,代码来源:class.ThinkUpController.php


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