本文整理汇总了PHP中Vtiger_Functions::getModuleName方法的典型用法代码示例。如果您正苦于以下问题:PHP Vtiger_Functions::getModuleName方法的具体用法?PHP Vtiger_Functions::getModuleName怎么用?PHP Vtiger_Functions::getModuleName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vtiger_Functions
的用法示例。
在下文中一共展示了Vtiger_Functions::getModuleName方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addRelation
function addRelation($request)
{
$sourceModule = $request->getModule();
$sourceRecordId = $request->get('src_record');
$relatedModule = $request->get('related_module');
if (is_numeric($relatedModule)) {
$relatedModule = Vtiger_Functions::getModuleName($relatedModule);
}
$relatedRecordIdList = $request->get('related_record_list');
$sourceModuleModel = Vtiger_Module_Model::getInstance($sourceModule);
$relatedModuleModel = Vtiger_Module_Model::getInstance($relatedModule);
$relationModel = Vtiger_Relation_Model::getInstance($sourceModuleModel, $relatedModuleModel);
foreach ($relatedRecordIdList as $relatedRecordId) {
$relationModel->addRelation($sourceRecordId, $relatedRecordId, $listPrice);
if ($relatedModule == 'PriceBooks') {
$recordModel = Vtiger_Record_Model::getInstanceById($relatedRecordId);
if ($sourceRecordId && ($sourceModule === 'Products' || $sourceModule === 'Services')) {
$parentRecordModel = Vtiger_Record_Model::getInstanceById($sourceRecordId, $sourceModule);
$recordModel->updateListPrice($sourceRecordId, $parentRecordModel->get('unit_price'));
}
}
}
$response = new Vtiger_Response();
$response->setResult(true);
$response->emit();
}
示例2: edit
public function edit(Vtiger_Request $request)
{
$moduleName = $request->getModule();
$qualifiedModuleName = $request->getModule(false);
$wid = $request->get('id');
$moduleModel = Settings_Widgets_Module_Model::getInstance($qualifiedModuleName);
$WidgetInfo = $moduleModel->getWidgetInfo($wid);
$RelatedModule = $moduleModel->getRelatedModule($WidgetInfo['tabid']);
$type = $WidgetInfo['type'];
$viewer = $this->getViewer($request);
$viewer->assign('SOURCE', $WidgetInfo['tabid']);
$viewer->assign('SOURCEMODULE', Vtiger_Functions::getModuleName($WidgetInfo['tabid']));
$viewer->assign('WID', $wid);
$viewer->assign('WIDGETINFO', $WidgetInfo);
$viewer->assign('TYPE', $type);
$viewer->assign('MODULE', $moduleName);
$viewer->assign('MODULE_MODEL', $moduleModel);
$viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
$viewer->assign('RELATEDMODULES', $RelatedModule);
$widgetName = 'Vtiger_' . $type . '_Widget';
if (class_exists($widgetName)) {
$widgetInstance = new $widgetName();
$tplName = $widgetInstance->getConfigTplName();
$viewer->view("widgets/{$tplName}.tpl", 'Vtiger');
}
}
示例3: getSelectableDashboard
public function getSelectableDashboard()
{
global $log;
$log->debug("Entering Settings_WidgetsManagement_Module_Model::getSelectableDashboard() method ...");
$db = PearDatabase::getInstance();
$currentUser = Users_Record_Model::getCurrentUserModel();
$sql = 'SELECT * FROM vtiger_links WHERE linktype = ?';
$params = array('DASHBOARDWIDGET');
$result = $db->pquery($sql, $params);
$widgets = array();
for ($i = 0; $i < $db->num_rows($result); $i++) {
$row = $db->query_result_rowdata($result, $i);
$moduleName = Vtiger_Functions::getModuleName($row['tabid']);
if ($moduleName != 'Home' && ($row['linklabel'] == 'Mini List' || $row['linklabel'] == 'Notebook')) {
continue;
}
if ($row['linklabel'] == 'Tag Cloud') {
$isTagCloudExists = getTagCloudView($currentUser->getId());
if ($isTagCloudExists == 'false') {
continue;
}
}
$moduleName = Vtiger_Functions::getModuleName($row['tabid']);
$widgets[$moduleName][] = Vtiger_Widget_Model::getInstanceFromValues($row);
}
$log->debug("Exiting Settings_WidgetsManagement_Module_Model::getSelectableDashboard() method ...");
return $widgets;
}
示例4: process
public function process(Vtiger_Request $request)
{
$moduleName = $request->getModule();
$qualifiedModuleName = $request->getModule(false);
$source = $request->get('source');
$sourceModule = $request->get('sourceModule');
if ($sourceModule != '') {
$source = Vtiger_Functions::getModuleId($sourceModule);
}
if ($source == '') {
$source = 6;
}
$moduleModel = Settings_Widgets_Module_Model::getInstance($qualifiedModuleName);
$RelatedModule = $moduleModel->getRelatedModule($source);
$viewer = $this->getViewer($request);
$viewer->assign('MODULE_MODEL', $moduleModel);
$viewer->assign('SOURCE', $source);
$viewer->assign('SOURCEMODULE', Vtiger_Functions::getModuleName($source));
$viewer->assign('WIDGETS', $moduleModel->getWidgets($source));
$viewer->assign('RELATEDMODULES', $RelatedModule);
$viewer->assign('FILTERS', json_encode($moduleModel->getFiletrs($RelatedModule)));
$viewer->assign('CHECKBOXS', json_encode($moduleModel->getCheckboxs($RelatedModule)));
//$viewer->assign('EXCLUDEDTYPES', $moduleModel->excludedTypes($source) );
$viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
$viewer->assign('MODULE', $moduleName);
$viewer->view('Index.tpl', $qualifiedModuleName);
}
示例5: getListViewEntries
/**
* Function to get the list view entries
* @param Vtiger_Paging_Model $pagingModel
* @return <Array> - Associative array of record id mapped to Vtiger_Record_Model instance.
*/
public function getListViewEntries($pagingModel)
{
$db = PearDatabase::getInstance();
$module = $this->getModule();
$moduleName = $module->getName();
$parentModuleName = $module->getParentName();
$qualifiedModuleName = $moduleName;
if (!empty($parentModuleName)) {
$qualifiedModuleName = $parentModuleName . ':' . $qualifiedModuleName;
}
$recordModelClass = Vtiger_Loader::getComponentClassName('Model', 'Record', $qualifiedModuleName);
$listQuery = $this->getBasicListQuery();
$startIndex = $pagingModel->getStartIndex();
$pageLimit = $pagingModel->getPageLimit();
$orderBy = $this->getForSql('orderby');
if (!empty($orderBy) && $orderBy === 'smownerid') {
$fieldModel = Vtiger_Field_Model::getInstance('assigned_user_id', $moduleModel);
if ($fieldModel->getFieldDataType() == 'owner') {
$orderBy = 'COALESCE(CONCAT(vtiger_users.first_name,vtiger_users.last_name),vtiger_groups.groupname)';
}
}
if (!empty($orderBy)) {
$listQuery .= ' ORDER BY ' . $orderBy . ' ' . $this->getForSql('sortorder');
}
$sourceModule = $this->get('sourceModule');
if (!empty($sourceModule)) {
$tabId = Vtiger_Functions::getModuleId($sourceModule);
$listQuery .= " WHERE `module` = '{$tabId}' ";
}
if ($module->isPagingSupported()) {
$nextListQuery = $listQuery . ' LIMIT ' . ($startIndex + $pageLimit) . ',1';
$listQuery .= " LIMIT {$startIndex}, {$pageLimit}";
}
$listResult = $db->pquery($listQuery, array());
$noOfRecords = $db->num_rows($listResult);
$listViewRecordModels = array();
for ($i = 0; $i < $noOfRecords; ++$i) {
$row = $db->query_result_rowdata($listResult, $i);
$record = new $recordModelClass();
$record->setData($row);
$recordModule = Vtiger_Functions::getModuleName($row['module']);
$record->set('module', vtranslate($recordModule, $recordModule));
if (method_exists($record, 'getModule') && method_exists($record, 'setModule')) {
$moduleModel = Settings_Vtiger_Module_Model::getInstance($qualifiedModuleName);
$record->setModule($moduleModel);
}
$listViewRecordModels[$record->getId()] = $record;
}
if ($module->isPagingSupported()) {
$pagingModel->calculatePageRange($listViewRecordModels);
$nextPageResult = $db->pquery($nextListQuery, array());
$nextPageNumRows = $db->num_rows($nextPageResult);
if ($nextPageNumRows <= 0) {
$pagingModel->set('nextPageExists', false);
}
}
return $listViewRecordModels;
}
示例6: getListViewEntries
/**
* Function to get the list view entries
* @param Vtiger_Paging_Model $pagingModel
* @return <Array> - Associative array of record id mapped to Vtiger_Record_Model instance.
*/
public function getListViewEntries($pagingModel)
{
$db = PearDatabase::getInstance();
$module = $this->getModule();
$parentModuleName = $module->getParentName();
if (!empty($parentModuleName)) {
$qualifiedModuleName = $parentModuleName . ':' . $module->getName();
}
$recordModelClass = Vtiger_Loader::getComponentClassName('Model', 'Record', $qualifiedModuleName);
$listFields = $module->listFields;
$listQuery = 'SELECT ';
foreach ($listFields as $fieldName => $fieldLabel) {
$listQuery .= '`' . $fieldName . '`, ';
}
$listQuery .= '`' . $module->baseIndex . '` FROM `' . $module->baseTable . '`';
$params = [];
$sourceModule = $this->get('sourceModule');
if (!empty($sourceModule)) {
$sourceModule = Vtiger_Functions::getModuleName($sourceModule);
$listQuery .= ' WHERE `tabid` = ?';
$params[] = $sourceModule;
}
$startIndex = $pagingModel->getStartIndex();
$pageLimit = $pagingModel->getPageLimit();
$orderBy = $this->getForSql('orderby');
if (!empty($orderBy)) {
$listQuery .= ' ORDER BY ' . $orderBy . ' ' . $this->getForSql('sortorder');
}
$nextListQuery = $listQuery . ' LIMIT ' . ($startIndex + $pageLimit) . ',1';
$listQuery .= " LIMIT {$startIndex}," . ($pageLimit + 1);
$listResult = $db->pquery($listQuery, $params);
$listViewRecordModels = [];
while ($row = $db->getRow($listResult)) {
$recordModel = new $recordModelClass();
$moduleName = Vtiger_Functions::getModuleName($row['tabid']);
$relModuleName = Vtiger_Functions::getModuleName($row['reltabid']);
$row['tabid'] = vtranslate($moduleName, $moduleName);
$row['reltabid'] = vtranslate($relModuleName, $relModuleName);
$recordModel->setData($row);
$listViewRecordModels[$recordModel->getId()] = $recordModel;
}
$pagingModel->calculatePageRange($listViewRecordModels);
if ($listResult->rowCount() > $pageLimit) {
array_pop($listViewRecordModels);
$pagingModel->set('nextPageExists', true);
} else {
$pagingModel->set('nextPageExists', false);
}
$nextPageResult = $db->pquery($nextListQuery, $params);
if ($nextPageResult->rowCount() <= 0) {
$pagingModel->set('nextPageExists', false);
}
return $listViewRecordModels;
}
示例7: process
public function process(Vtiger_Request $request)
{
$recordId = $request->get('id');
$moduleInstance = Settings_MappedFields_Module_Model::getInstanceById($recordId);
header('content-type: application/xml; charset=utf-8');
header('Pragma: public');
header('Cache-Control: private');
header('Content-Disposition: attachment; filename=' . $recordId . '_mftemplate.xml');
header('Content-Description: PHP Generated Data');
$xml = new DOMDocument('1.0', 'utf-8');
$xml->preserveWhiteSpace = false;
$xml->formatOutput = true;
$xmlTemplate = $xml->createElement('mf_template');
$xmlFields = $xml->createElement('fields');
$xmlField = $xml->createElement('field');
$cDataColumns = ['conditions', 'params'];
$changeNames = ['tabid', 'reltabid'];
foreach (Settings_MappedFields_Module_Model::$allFields as $field) {
if (in_array($field, $cDataColumns)) {
$name = $xmlTemplate->appendChild($xml->createElement($field));
$name->appendChild($xml->createCDATASection(html_entity_decode($moduleInstance->getRecord()->getRaw($field))));
} else {
if (in_array($field, $changeNames)) {
$value = Vtiger_Functions::getModuleName($moduleInstance->get($field));
} else {
$value = $moduleInstance->get($field);
}
$xmlColumn = $xml->createElement($field, html_entity_decode($value, ENT_COMPAT, 'UTF-8'));
}
$xmlTemplate->appendChild($xmlColumn);
}
foreach ($moduleInstance->getMapping() as $field) {
$xmlField = $xml->createElement('field');
foreach ($field as $key => $details) {
if (gettype($details) == 'object') {
$value = $details->getFieldName();
} else {
$value = $details;
}
$xmlColumn = $xml->createElement($key, html_entity_decode($value, ENT_COMPAT, 'UTF-8'));
$xmlField->appendChild($xmlColumn);
}
$xmlFields->appendChild($xmlField);
}
$xmlTemplate->appendChild($xmlFields);
$xmlTemplate->appendChild($xmlFields);
$xml->appendChild($xmlTemplate);
print $xml->saveXML();
}
示例8: step
public function step($step, Vtiger_Request $request)
{
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
$qualifiedModuleName = $request->getModule(false);
$recordId = $request->get('record');
if ($recordId) {
$moduleInstance = Settings_MappedFields_Module_Model::getInstanceById($recordId);
$viewer->assign('RECORDID', $recordId);
$viewer->assign('MODE', 'edit');
} else {
$moduleInstance = Settings_MappedFields_Module_Model::getCleanInstance();
}
$viewer->assign('MAPPEDFIELDS_MODULE_MODEL', $moduleInstance);
$allModules = Settings_MappedFields_Module_Model::getSupportedModules();
$viewer->assign('ALL_MODULES', $allModules);
$viewer->assign('MODULE', $moduleName);
$viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
switch ($step) {
case 'step4':
$viewer->view('Step4.tpl', $qualifiedModuleName);
break;
case 'step3':
$moduleSourceName = Vtiger_Functions::getModuleName($moduleInstance->get('tabid'));
$moduleModel = Vtiger_Module_Model::getInstance($moduleSourceName);
$recordStructureInstance = Vtiger_RecordStructure_Model::getInstanceForModule($moduleModel);
$viewer->assign('RECORD_STRUCTURE', $recordStructureInstance->getStructure());
$viewer->assign('SOURCE_MODULE', $moduleSourceName);
$viewer->assign('ADVANCE_CRITERIA', Vtiger_AdvancedFilter_Helper::transformToAdvancedFilterCondition($moduleInstance->get('conditions')));
$viewer->view('Step3.tpl', $qualifiedModuleName);
break;
case 'step2':
$currentUser = Users_Record_Model::getCurrentUserModel();
$assignedToValues = [];
$assignedToValues['LBL_USERS'] = $currentUser->getAccessibleUsers();
$assignedToValues['LBL_GROUPS'] = $currentUser->getAccessibleGroups();
$viewer->assign('SEL_MODULE_MODEL', Settings_MappedFields_Module_Model::getInstance($moduleInstance->get('tabid')));
$viewer->assign('REL_MODULE_MODEL', Settings_MappedFields_Module_Model::getInstance($moduleInstance->get('reltabid')));
$viewer->assign('USERS_LIST', $assignedToValues);
$viewer->view('Step2.tpl', $qualifiedModuleName);
break;
case 'step1':
default:
$viewer->view('Step1.tpl', $qualifiedModuleName);
break;
}
}
示例9: addRelation
function addRelation($request)
{
$sourceModule = $request->getModule();
$sourceRecordId = $request->get('src_record');
$relatedModule = $request->get('related_module');
if (is_numeric($relatedModule)) {
$relatedModule = Vtiger_Functions::getModuleName($relatedModule);
}
$relatedRecordIdList = $request->get('related_record_list');
$sourceModuleModel = Vtiger_Module_Model::getInstance($sourceModule);
$relatedModuleModel = Vtiger_Module_Model::getInstance($relatedModule);
$relationModel = Vtiger_Relation_Model::getInstance($sourceModuleModel, $relatedModuleModel);
foreach ($relatedRecordIdList as $relatedRecordId) {
$relationModel->addRelation($sourceRecordId, $relatedRecordId, $listPrice);
}
$response = new Vtiger_Response();
$response->setResult(true);
$response->emit();
}
示例10: process
public function process(Vtiger_Request $request)
{
vimport('~~modules/OSSPdf/helpers/Conditions.php');
$moduleSettingsName = $request->getModule(false);
$moduleName = $request->getModule();
$record = $request->get('record');
$baseModule = Vtiger_Functions::getModuleName($request->get('base_module'));
$num = $request->get('num');
if ("" == $num) {
$num = 0;
}
$viewer = $this->getViewer($request);
$viewer->assign('NUM', ++$num);
$viewer->assign('MODULE', $moduleName);
$viewer->assign('BASE_MODULE', $baseModule);
$viewer->assign('CONDITION_LIST', Conditions::getListBaseModuleField($baseModule));
$viewer->assign('FIELD_LIST', Conditions::getListBaseModuleField($baseModule));
echo $viewer->view('Condition.tpl', $moduleSettingsName, true);
}
示例11: getType
public function getType($module = false)
{
$moduleName = Vtiger_Functions::getModuleName($module);
$dir = 'modules/Vtiger/widgets/';
$ffs = scandir($dir);
foreach ($ffs as $ff) {
$action = str_replace('.php', "", $ff);
if ($ff != '.' && $ff != '..' && !is_dir($dir . '/' . $ff) && $action != 'Basic') {
$folderFiles[$action] = $action;
vimport('~~' . $dir . $ff);
$modelClassName = Vtiger_Loader::getComponentClassName('Widget', $action, 'Vtiger');
$instance = new $modelClassName();
if ($instance->allowedModules && !in_array($moduleName, $instance->allowedModules)) {
unset($folderFiles[$action]);
}
}
}
return $folderFiles;
}
示例12: process
public function process(Vtiger_Request $request)
{
$moduleName = $request->getModule();
$qualifiedModuleName = $request->getModule(false);
$wid = $request->get('id');
$moduleModel = Settings_Widgets_Module_Model::getInstance($qualifiedModuleName);
$WidgetInfo = $moduleModel->getWidgetInfo($wid);
$RelatedModule = $moduleModel->getRelatedModule($WidgetInfo['tabid']);
$viewer = $this->getViewer($request);
$viewer->assign('MODULE_MODEL', $moduleModel);
$viewer->assign('SOURCE', $WidgetInfo['tabid']);
$viewer->assign('SOURCEMODULE', Vtiger_Functions::getModuleName($WidgetInfo['tabid']));
$viewer->assign('WID', $wid);
$viewer->assign('WIDGETINFO', $WidgetInfo);
$viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
$viewer->assign('RELATEDMODULES', $RelatedModule);
$viewer->assign('MODULE', $moduleName);
$viewer->view('Edit.tpl', $qualifiedModuleName);
}
示例13: getStatusNotModify
/**
* Gets status
* @return - array of status
*/
public static function getStatusNotModify()
{
$log = vglobal('log');
$adb = PearDatabase::getInstance();
$log->debug("Entering Settings_RealizationProcesses_Module_Model::getStatusNotModify() method ...");
$sql = 'SELECT * FROM `vtiger_realization_process`;';
$result = $adb->query($sql);
$rowsNum = $adb->num_rows($result);
for ($i = 0; $i < $rowsNum; $i++) {
$moduleId = $adb->query_result($result, $i, 'module_id');
$moduleName = Vtiger_Functions::getModuleName($moduleId);
$return[$moduleName]['id'] = $moduleId;
$status = Zend_Json::decode(html_entity_decode($adb->query_result($result, $i, 'status_indicate_closing')));
if (!is_array($status)) {
$status = [$status];
}
$return[$moduleName]['status'] = $status;
}
$log->debug("Exiting Settings_RealizationProcesses_Module_Model::getStatusNotModify() method ...");
return $return;
}
示例14: process
public function process(Vtiger_Request $request) {
$viewer = $this->getViewer ($request);
$moduleName = $request->getModule();
$qualifiedModuleName = $request->getModule(false);
$module = Vtiger_Functions::getModuleName($request->get("module_id"));
$adb = PearDatabase::getInstance();
$sql = "select * from vtiger_customview where viewname = ? and entitytype = ? and status = ?";
$result = $adb->pquery($sql, array('All', $module, 0));
while($row = $adb->fetchByAssoc($result)){
$record = $row['cvid'];
}
$customViewModel = CustomView_Record_Model::getInstanceById($record);
$moduleModel = Vtiger_Module_Model::getInstance($module);
$recordStructureInstance = Vtiger_RecordStructure_Model::getInstanceForModule($moduleModel);
$recordStructure = $recordStructureInstance->getStructure();
$viewer->assign('CUSTOMVIEW_MODEL', $customViewModel);
$viewer->assign('RECORD_STRUCTURE', $recordStructure);
$viewer->assign('RECORD_ID', $record);
$viewer->assign('SOURCE_MODULE', $module);
$viewer->assign('MODULENAME', $moduleName);
echo $viewer->view('List2.tpl', $qualifiedModuleName,true);
}
示例15: getMenu
//.........这里部分代码省略.........
for ($k = 0; count($res) > $k; $k++) {
$prefix = substr($res[$k], 0, strpos($res[$k], "*"));
$value = substr($res[$k], 6);
// echo '<pre>';print_r($value);echo '</pre>';exit;
if (Users_Record_Model::getCurrentUserModel()->get('language') == $prefix) {
$subName = $value;
}
}
} elseif ($langfiedpick) {
$res = explode('#', $langfiedpick);
for ($k = 0; count($res) > $k; $k++) {
$prefix = substr($res[$k], 0, strpos($res[$k], "*"));
$value = substr($res[$k], 6);
// echo '<pre>';print_r($value);echo '</pre>';exit;
if (Users_Record_Model::getCurrentUserModel()->get('language') == $prefix) {
$subName = $value;
}
}
}
if ($newWindow == 1) {
$newWindow = '*_blank*';
} else {
$newWindow = '';
}
switch (intval($type)) {
case 0:
$model = Vtiger_Module_Model::getInstance($subNameOrg);
if ($model) {
$url = $model->getDefaultUrl();
} else {
// usuń nieistniejącą pozycję
$recordModel = Vtiger_Record_Model::getCleanInstance('OSSMenuManager');
$recordModel->deleteMenu($subId);
$url = false;
}
break;
case 1:
case 2:
case 3:
case 4:
default:
$url = $db->query_result_raw($subResult, $j, 'url');
}
if ($url !== false) {
$url = $newWindow . $url;
$menuStructure[$name][$j] = array('name' => $subName, 'mod' => $subNameOrg, 'link' => $url, 'sizeicon_first' => $subsizeicon_first, 'sizeicon_second' => $subsizeicon_second, 'locationiconname' => $locationiconname);
}
$moduleName = Vtiger_Functions::getModuleName($tabId);
$excludedViews = array("DashBoard", 'index', 'Index');
$purl = false;
if ($request->get('module') != '' && $request->get('module') == $moduleName && vglobal('breadcrumbs') && $request->get('parent') == '') {
$breadcrumbs[] = array('lable' => vtranslate($name, 'OSSMenuManager'));
$breadcrumbs[] = array('lable' => vtranslate($subName, $moduleName), 'url' => $url, 'class' => 'moduleColor_' . $moduleName);
if ($request->get('view') == 'Edit' && $request->get('record') == '') {
$breadcrumbs[] = array('lable' => vtranslate('LBL_VIEW_CREATE', $moduleName));
} elseif (!in_array($request->get('view'), $excludedViews)) {
$breadcrumbs[] = array('lable' => vtranslate('LBL_VIEW_' . strtoupper($request->get('view')), $moduleName));
}
if ($request->get('record') != '') {
$recordLabel = Vtiger_Functions::getCRMRecordLabel($request->get('record'));
if ($recordLabel != '') {
$breadcrumbs[] = array('lable' => $recordLabel);
}
}
} elseif (vglobal('breadcrumbs') && $request->get('module') != '' && $request->get('parent') == '') {
$parts = parse_url($url);
parse_str($parts['query'], $purl);
if ($request->get('module') == $purl['module'] && $request->get('view') == $purl['view'] && $request->get('viewname') == $purl['viewname']) {
$breadcrumbs[] = array('lable' => vtranslate($name, 'OSSMenuManager'));
$breadcrumbs[] = array('lable' => vtranslate($request->get('module'), $request->get('module')), 'url' => 'index.php?module=' . $request->get('module') . '&view=List', 'class' => 'moduleColor_' . $request->get('module'));
if ($request->get('view') != 'List') {
$breadcrumbs[] = array('lable' => vtranslate($subName, $moduleName), 'url' => $url);
}
}
}
}
}
$menuStructureGroupe[$name]['iconf'] = $sizeicon_first;
$menuStructureGroupe[$name]['picon'] = $locationicon;
$menuStructureGroupe[$name]['icons'] = $sizeicon_second;
}
if (vglobal('breadcrumbs') && count($breadcrumbs) == 0 && $request->get('module') != '' && $request->get('parent') == '') {
$breadcrumbs[] = array('lable' => vtranslate($request->get('module'), $request->get('module')), 'url' => 'index.php?module=' . $request->get('module') . '&view=List', 'class' => 'moduleColor_' . $request->get('module'));
if ($request->get('view') == 'Edit' && $request->get('record') == '') {
$breadcrumbs[] = array('lable' => vtranslate('LBL_VIEW_CREATE', $request->get('module')));
} else {
$breadcrumbs[] = array('lable' => vtranslate('LBL_VIEW_' . strtoupper($request->get('view')), $request->get('module')));
}
if ($request->get('record') != '') {
$recordLabel = Vtiger_Functions::getCRMRecordLabel($request->get('record'));
if ($recordLabel != '') {
$breadcrumbs[] = array('lable' => $recordLabel);
}
}
}
return array('structure' => $menuStructure, 'icons' => $menuStructureGroupe, 'breadcrumbs' => $breadcrumbs);
} else {
return array();
}
}