本文整理汇总了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;
}
示例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;
}
}
示例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);
}
示例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;
}