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


PHP ViewFactory::_loadConfig方法代码示例

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


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

示例1: loadView

 /**
  * load the correct view
  *
  * @param string         $type View Type
  *
  * @param string         $module
  * @param SugarBean|null $bean
  * @param array          $view_object_map
  * @param string         $target_module
  *
  * @return SugarView
  */
 public static function loadView($type = 'default', $module, SugarBean $bean = null, array $view_object_map = [], $target_module = '')
 {
     $type = strtolower($type);
     //first let's check if the module handles this view
     $view = null;
     //Check to see if we should load a custom parent view instance
     loadParentView($type);
     if (!empty($target_module)) {
         if (file_exists($path = DOCROOT . "custom/modules/{$target_module}/views/view.{$type}.php")) {
             $view = ViewFactory::_buildFromFile($path, $bean, $view_object_map, $type, $target_module);
         } else {
             if (file_exists($path = DOCROOT . "modules/{$target_module}/views/view.{$type}.php")) {
                 $view = ViewFactory::_buildFromFile($path, $bean, $view_object_map, $type, $target_module);
             }
         }
     }
     if (!isset($view)) {
         if (file_exists($path = DOCROOT . "custom/modules/{$module}/views/view.{$type}.php")) {
             $view = ViewFactory::_buildFromFile($path, $bean, $view_object_map, $type, $module);
         } else {
             if (file_exists($path = DOCROOT . "modules/{$module}/views/view.{$type}.php")) {
                 $view = ViewFactory::_buildFromFile($path, $bean, $view_object_map, $type, $module);
             } else {
                 if (file_exists($path = DOCROOT . "custom/include/MVC/View/views/view.{$type}.php")) {
                     $view = ViewFactory::_buildFromFile($path, $bean, $view_object_map, $type, $module);
                 } else {
                     if (file_exists($path = DOCROOT . "include/MVC/View/views/view.{$type}.php")) {
                         //it appears Sugar does have the proper logic for this file.
                         $view = ViewFactory::_buildFromFile($path, $bean, $view_object_map, $type, $module);
                     }
                 }
             }
         }
     }
     // Default to SugarView if still nothing found/built
     if (is_null($view)) {
         $view = new SugarView();
     }
     ViewFactory::_loadConfig($view, $type);
     return $view;
 }
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:53,代码来源:ViewFactory.php

示例2: loadView

 /**
  * load the correct view
  * @param string $type View Type
  * @return valid view
  */
 function loadView($type = 'default', $module, $bean = null, $view_object_map = array(), $target_module = '')
 {
     $type = strtolower($type);
     //first let's check if the module handles this view
     $view = null;
     //Check to see if we should load a custom parent view instance
     loadParentView($type);
     if (!empty($target_module)) {
         $view_file = SugarAutoLoader::existingCustomOne('modules/' . $target_module . '/views/view.' . $type . '.php');
         $view_module = $target_module;
     } else {
         $view_module = $module;
     }
     if (empty($view_file)) {
         $view_file = SugarAutoLoader::existingCustomOne('modules/' . $module . '/views/view.' . $type . '.php');
     }
     if (empty($view_file)) {
         $view_file = SugarAutoLoader::existingCustomOne('include/MVC/View/views/view.' . $type . '.php');
     }
     if (!empty($view_file)) {
         $view = ViewFactory::_buildFromFile($view_file, $bean, $view_object_map, $type, $view_module);
     }
     if (empty($view)) {
         // Default to SugarView if still nothing found/built
         $view = new SugarView();
     }
     ViewFactory::_loadConfig($view, $type);
     return $view;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:34,代码来源:ViewFactory.php

示例3: loadView

 /**
  * load the correct view
  * @param string $type View Type
  * @return valid view
  */
 function loadView($type = 'default', $module, $bean = null, $view_object_map = array())
 {
     $type = strtolower($type);
     //first let's check if the module handles this view
     $view = null;
     if (file_exists('custom/modules/' . $module . '/views/view.' . $type . '.php')) {
         $view = ViewFactory::_buildFromFile('custom/modules/' . $module . '/views/view.' . $type . '.php', $bean, $view_object_map, $type, $module);
     } else {
         if (file_exists('modules/' . $module . '/views/view.' . $type . '.php')) {
             $view = ViewFactory::_buildFromFile('modules/' . $module . '/views/view.' . $type . '.php', $bean, $view_object_map, $type, $module);
         } else {
             if (file_exists('custom/include/MVC/View/views/view.' . $type . '.php')) {
                 $view = ViewFactory::_buildFromFile('custom/include/MVC/View/views/view.' . $type . '.php', $bean, $view_object_map, $type, $module);
             } else {
                 //if the module does not handle this view, then check if Sugar handles it OOTB
                 $file = 'include/MVC/View/views/view.' . $type . '.php';
                 if (file_exists($file)) {
                     //it appears Sugar does have the proper logic for this file.
                     $view = ViewFactory::_buildFromFile($file, $bean, $view_object_map, $type, $module);
                 }
             }
         }
     }
     // Default to SugarView if still nothing found/built
     if (!isset($view)) {
         $view = new SugarView();
     }
     ViewFactory::_loadConfig($view, $type);
     return $view;
 }
开发者ID:klr2003,项目名称:sourceread,代码行数:35,代码来源:ViewFactory.php

示例4: testShowSubpanelsSettingForPrint

 public function testShowSubpanelsSettingForPrint()
 {
     $viewClass = 'ViewDetail';
     $type = 'detail';
     $view = new $viewClass();
     $view->module = 'Cases';
     ViewFactory::_loadConfig($view, $type);
     $_REQUEST['print'] = true;
     $view->preDisplay();
     $this->assertFalse($view->options['show_subpanels'], 'show_subpanels should be false for print');
 }
开发者ID:thsonvt,项目名称:sugarcrm_dev,代码行数:11,代码来源:Bug47572Test.php

示例5: test_loadConfig

 public function test_loadConfig()
 {
     //check with a invalid module, method must not change the view options.
     $view = ViewFactory::loadView('default', '');
     $options = $view->options;
     ViewFactory::_loadConfig($view, 'default');
     $this->assertSame($options, $view->options);
     //check with a valid module which does not implement it's own view config. method must not change the view options.
     $view = ViewFactory::loadView('detail', 'Users');
     $options = $view->options;
     ViewFactory::_loadConfig($view, 'detail');
     $this->assertSame($options, $view->options);
     //check with a valid module which implement it's own view config. method still must not change the view options because it needs.
     $view = ViewFactory::loadView('area_detail_map', 'jjwg_Areas');
     $view->module = 'jjwg_Areas';
     $options = $view->options;
     ViewFactory::_loadConfig($view, 'area_detail_map');
     $this->assertSame($options, $view->options);
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:19,代码来源:ViewFactoryTest.php


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