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


PHP AppConfig::relation方法代码示例

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


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

示例1: getModalScripts

 public function getModalScripts(Vtiger_Request $request)
 {
     $parentScriptInstances = parent::getModalScripts($request);
     $scripts = ['~libraries/jquery/jstree/jstree.js'];
     if (AppConfig::relation('SELECTABLE_CATEGORY')) {
         $scripts[] = '~libraries/jquery/jstree/jstree.category.js';
     }
     if ($this->relationType == 1) {
         $scripts[] = '~libraries/jquery/jstree/jstree.edit.js';
     }
     $scripts[] = 'modules.Vtiger.resources.TreeCategoryModal';
     $modalInstances = $this->checkAndConvertJsScripts($scripts);
     $scriptInstances = array_merge($modalInstances, $parentScriptInstances);
     return $scriptInstances;
 }
开发者ID:nikdejan,项目名称:YetiForceCRM,代码行数:15,代码来源:TreeCategoryModal.php

示例2: load

 public static function load($key, $config)
 {
     switch ($key) {
         case 'debug':
             self::$debug = $config;
             break;
         case 'developer':
             self::$developer = $config;
             break;
         case 'security':
             self::$security = $config;
             break;
         case 'securityKeys':
             self::$securityKeys = $config;
             break;
         case 'performance':
             self::$performance = $config;
             break;
         case 'relation':
             self::$relation = $config;
             break;
     }
 }
开发者ID:nikdejan,项目名称:YetiForceCRM,代码行数:23,代码来源:ConfigUtils.php

示例3: preProcess

 public function preProcess(Vtiger_Request $request, $display = true)
 {
     parent::preProcess($request);
     $viewer = $this->getViewer($request);
     $viewer->assign('SELECTABLE_CATEGORY', AppConfig::relation('SELECTABLE_CATEGORY') ? 1 : 0);
 }
开发者ID:nikdejan,项目名称:YetiForceCRM,代码行数:6,代码来源:TreeRecords.php

示例4: getTreeEntries

 public function getTreeEntries()
 {
     $db = PearDatabase::getInstance();
     $recordId = $this->getParentRecordModel()->getId();
     $relModuleId = $this->getRelatedModuleModel()->getId();
     $relModuleName = $this->getRelatedModuleModel()->getName();
     $treeViewModel = $this->getTreeViewModel();
     $relationModel = $this->getRelationModel();
     $fields = $treeViewModel->getTreeField();
     $template = $treeViewModel->getTemplate();
     $result = $db->pquery('SELECT tr.*,rel.crmid,rel.rel_created_time,rel.rel_created_user,rel.rel_comment FROM vtiger_trees_templates_data tr ' . 'INNER JOIN u_yf_crmentity_rel_tree rel ON rel.tree = tr.tree ' . 'WHERE tr.templateid = ? AND rel.crmid = ? AND rel.relmodule = ?', [$template, $recordId, $relModuleId]);
     $trees = [];
     while ($row = $db->getRow($result)) {
         $treeID = $row['tree'];
         $pieces = explode('::', $row['parenttrre']);
         end($pieces);
         $parent = prev($pieces);
         $parentName = '';
         if ($row['depth'] > 0) {
             $result2 = $db->pquery('SELECT name FROM vtiger_trees_templates_data WHERE templateid = ? AND tree = ?', [$template, $parent]);
             $parentName = $db->getSingleValue($result2);
             $parentName = '(' . vtranslate($parentName, $relModuleName) . ') ';
         }
         $tree = ['id' => $treeID, 'name' => $parentName . vtranslate($row['name'], $relModuleName), 'parent' => $parent == 0 ? '#' : $parent];
         if ($relationModel->showCreatorDetail()) {
             $tree['relCreatedUser'] = getOwnerName($row['rel_created_user']);
             $tree['relCreatedTime'] = Vtiger_Datetime_UIType::getDisplayDateTimeValue($row['rel_created_time']);
         }
         if ($relationModel->showComment()) {
             if (strlen($row['rel_comment']) > AppConfig::relation('COMMENT_MAX_LENGTH')) {
                 $tree['relCommentFull'] = $row['rel_comment'];
             }
             $tree['relComment'] = Vtiger_Functions::textLength($row['rel_comment'], AppConfig::relation('COMMENT_MAX_LENGTH'));
         }
         if (!empty($row['icon'])) {
             $tree['icon'] = $row['icon'];
         }
         $trees[] = $tree;
     }
     return $trees;
 }
开发者ID:HoererUndFlamme,项目名称:YetiForceCRM,代码行数:41,代码来源:RelationListView.php


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