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


PHP SugarView::getMetaDataFile方法代码示例

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


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

示例1: array

 function get_module_view_defs($moduleName, $type, $view)
 {
     require_once 'include/MVC/View/SugarView.php';
     $metadataFile = null;
     $results = array();
     if (empty($moduleName)) {
         return $results;
     }
     $view = strtolower($view);
     if ($view == 'subpanel') {
         $results = $this->get_subpanel_defs($moduleName, $type);
     } else {
         $v = new SugarView(null, array());
         $v->module = $moduleName;
         $v->type = $view;
         $fullView = ucfirst($view) . 'View';
         $metadataFile = $v->getMetaDataFile();
         require_once $metadataFile;
         if ($view == 'list') {
             $results = $listViewDefs[$moduleName];
         } else {
             $results = $viewdefs[$moduleName][$fullView];
         }
     }
     //Add field level acls.
     $results = $this->addFieldLevelACLs($moduleName, $type, $view, $results);
     return $results;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:28,代码来源:SugarWebServiceUtilv4.php

示例2: array

 function get_module_view_defs($moduleName, $type, $view)
 {
     require_once 'include/MVC/View/SugarView.php';
     $metadataFile = null;
     $results = array();
     if (empty($moduleName)) {
         return $results;
     }
     $view = strtolower($view);
     switch (strtolower($type)) {
         case 'wireless':
             if ($view == 'list') {
                 require_once 'include/SugarWireless/SugarWirelessListView.php';
                 $GLOBALS['module'] = $moduleName;
                 //WirelessView keys off global variable not instance variable...
                 $v = new SugarWirelessListView();
                 $results = $v->getMetaDataFile();
                 $results = self::formatWirelessListViewResultsToArray($results);
             } elseif ($view == 'subpanel') {
                 $results = $this->get_subpanel_defs($moduleName, $type);
             } else {
                 require_once 'include/SugarWireless/SugarWirelessView.php';
                 $v = new SugarWirelessView();
                 $v->module = $moduleName;
                 $fullView = ucfirst($view) . 'View';
                 $meta = $v->getMetaDataFile('Wireless' . $fullView);
                 $metadataFile = $meta['filename'];
                 require $metadataFile;
                 //Wireless detail metadata may actually be just edit metadata.
                 $results = isset($viewdefs[$meta['module_name']][$fullView]) ? $viewdefs[$meta['module_name']][$fullView] : $viewdefs[$meta['module_name']]['EditView'];
             }
             break;
         case 'default':
         default:
             if ($view == 'subpanel') {
                 $results = $this->get_subpanel_defs($moduleName, $type);
             } else {
                 $v = new SugarView(null, array());
                 $v->module = $moduleName;
                 $v->type = $view;
                 $fullView = ucfirst($view) . 'View';
                 $metadataFile = $v->getMetaDataFile();
                 require_once $metadataFile;
                 if ($view == 'list') {
                     $results = $listViewDefs[$moduleName];
                 } else {
                     $results = $viewdefs[$moduleName][$fullView];
                 }
             }
     }
     //Add field level acls.
     $results = $this->addFieldLevelACLs($moduleName, $type, $view, $results);
     return $results;
 }
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:54,代码来源:SugarWebServiceUtilv4.php

示例3: get_fts_list

function get_fts_list($qry_arr, $isMultiSelect = false, $ajaxSort = false)
{
    global $current_language, $current_user;
    global $urlPrefix, $currentModule, $theme;
    $current_module_strings = return_module_language($current_language, 'KBDocuments');
    // focus_list is the means of passing data to a ListView.
    global $focus_list;
    require_once 'include/ListView/ListViewSmarty.php';
    $view = new SugarView();
    $view->type = 'list';
    $view->module = 'KBDocuments';
    $metadataFile = $view->getMetaDataFile();
    require_once $metadataFile;
    require_once 'modules/KBDocuments/KBListViewData.php';
    // clear the display columns back to default when clear query is called
    if (!empty($_REQUEST['clear_query']) && $_REQUEST['clear_query'] == 'true') {
        $current_user->setPreference('ListViewDisplayColumns', array(), 0, $currentModule);
    }
    $savedDisplayColumns = $current_user->getPreference('ListViewDisplayColumns', $currentModule);
    // get user defined display columns
    $json = getJSONobj();
    $seedDocument = BeanFactory::getBean('KBDocuments');
    // seed bean
    // setup listview smarty
    $lv = new ListViewSmarty();
    $lv->lvd = new KBListViewData();
    $displayColumns = array();
    // check $_REQUEST if new display columns from post
    if (!empty($_REQUEST['displayColumns'])) {
        foreach (explode('|', $_REQUEST['displayColumns']) as $num => $col) {
            if (!empty($listViewDefs['KBDocuments'][$col])) {
                $displayColumns[$col] = $listViewDefs['KBDocuments'][$col];
            }
        }
    } elseif (!empty($savedDisplayColumns)) {
        // use user defined display columns from preferences
        $displayColumns = $savedDisplayColumns;
    } else {
        // use columns defined in listviewdefs for default display columns
        foreach ($listViewDefs['KBDocuments'] as $col => $params) {
            if (!empty($params['default']) && $params['default']) {
                $displayColumns[$col] = $params;
            }
        }
    }
    //disable mass update form
    $params = array('massupdate' => false);
    //process orderBy if set in request
    if (!empty($_REQUEST['orderBy'])) {
        $params['orderBy'] = $_REQUEST['orderBy'];
        $params['overrideOrder'] = true;
        if (!empty($_REQUEST['sortOrder'])) {
            $params['sortOrder'] = $_REQUEST['sortOrder'];
        }
    }
    //if ajax sort is set, then pass in param to display columns array that will change
    //the sort urls to be javascript based within tpl
    if ($ajaxSort) {
        foreach ($displayColumns as $col => $coldata) {
            $coldata['ajaxSort'] = true;
            $displayColumns[$col] = $coldata;
        }
    }
    $lv->displayColumns = $displayColumns;
    //grab the where and custom from clauses from passed in query
    $where = '';
    //check to see if param is a string
    if (is_string($qry_arr)) {
        //only the where string is passed in, just populate the where
        $where = $qry_arr;
    } elseif (is_array($qry_arr)) {
        //array was passed in, populate the where and custom_from
        if (isset($qry_arr['where'])) {
            $where = $qry_arr['where'];
        }
        if (isset($qry_arr['custom_from'])) {
            $params['custom_from'] = $qry_arr['custom_from'];
        }
    }
    if (!isset($where)) {
        $where = "";
    }
    global $listViewDefs;
    //disable some features.
    $lv->multiSelect = $isMultiSelect;
    $lv->lvd->additionalDetailsAjax = false;
    $lv->export = false;
    $lv->show_mass_update_form = false;
    $lv->show_action_dropdown = false;
    $lv->delete = false;
    $lv->select = false;
    $lv->setup($seedDocument, 'modules/KBDocuments/SearchListView.tpl', $where, $params);
    $savedSearchName = empty($_REQUEST['saved_search_select_name']) ? '' : ' - ' . $_REQUEST['saved_search_select_name'];
    //if this is a sort from browse tab, then set the ajaxsort flag to true
    if ($ajaxSort) {
        $lv->data['pageData']['urls']['ajaxSort'] = true;
    }
    //begin code that will remove single and double quotes for javascript use
    $temp_Data = array();
    //iterate through each record returned in list
//.........这里部分代码省略.........
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:101,代码来源:SearchUtils.php

示例4: array

 function get_module_view_defs($module_name, $type, $view)
 {
     $metadataFile = null;
     $results = array();
     $view = strtolower($view);
     switch (strtolower($type)) {
         case 'default':
         default:
             if ($view == 'subpanel') {
                 $results = $this->get_subpanel_defs($module_name, $type);
             } else {
                 $v = new SugarView(null, array());
                 $v->module = $module_name;
                 $v->type = $view;
                 $fullView = ucfirst($view) . 'View';
                 $metadataFile = $v->getMetaDataFile();
                 require_once $metadataFile;
                 if ($view == 'list') {
                     $results = $listViewDefs[$module_name];
                 } else {
                     $results = $viewdefs[$module_name][$fullView];
                 }
             }
     }
     return $results;
 }
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:26,代码来源:SugarWebServiceUtilv3_1.php

示例5: updateDependentFieldForListView

 function updateDependentFieldForListView($listview_def_main = '', $filter_fields = null)
 {
     static $listview_def = '';
     static $module_name = '';
     // for subpanels
     if (!empty($listview_def_main)) {
         $listview_def = $listview_def_main;
     } elseif (empty($listview_def) || $module_name != $this->module_name) {
         $view = new SugarView();
         $view->type = 'list';
         $view->module = $this->module_name;
         $listview_meta_file = $view->getMetaDataFile();
         if (!empty($listview_meta_file)) {
             require $listview_meta_file;
             if (isset($listViewDefs[$this->module_name])) {
                 $listview_def = $listViewDefs[$this->module_name];
             } else {
                 if (isset($listViewDefs[$this->object_name])) {
                     $listview_def = $listViewDefs[$this->object_name];
                 }
             }
         }
         $module_name = $this->module_name;
     }
     $this->updateDependentField($filter_fields);
     $this->is_updated_dependent_fields = true;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:27,代码来源:SugarBean.php

示例6: testgetMetaDataFile

 public function testgetMetaDataFile()
 {
     $SugarView = new SugarView();
     //first execute the method with missing attributes. it should return Null.
     $metaDataFile = $SugarView->getMetaDataFile();
     $this->assertEquals(null, $metaDataFile);
     //second execute the method with valid attributes set. it should return a file path string.
     $SugarView->type = 'detail';
     $SugarView->module = 'Users';
     $metaDataFile = $SugarView->getMetaDataFile();
     $this->assertGreaterThan(0, strlen($metaDataFile));
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:12,代码来源:SugarViewTest.php


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