本文整理汇总了PHP中Sugar_Smarty::fetchCustom方法的典型用法代码示例。如果您正苦于以下问题:PHP Sugar_Smarty::fetchCustom方法的具体用法?PHP Sugar_Smarty::fetchCustom怎么用?PHP Sugar_Smarty::fetchCustom使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sugar_Smarty
的用法示例。
在下文中一共展示了Sugar_Smarty::fetchCustom方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getForm
function getForm($module, $inline = true)
{
global $db, $current_user, $currentModule, $current_language, $app_strings;
$json = getJSONobj();
$saved_search_mod_strings = return_module_language($current_language, 'SavedSearch');
$query = 'SELECT id, name FROM saved_search
WHERE
deleted = \'0\' AND
assigned_user_id = \'' . $current_user->id . '\' AND
search_module = \'' . $module . '\'
ORDER BY name';
$result = $db->query($query, true, "Error filling in saved search list: ");
$savedSearchArray['_none'] = $app_strings['LBL_NONE'];
while ($row = $db->fetchByAssoc($result, -1, FALSE)) {
$savedSearchArray[$row['id']] = htmlspecialchars($row['name'], ENT_QUOTES);
}
$sugarSmarty = new Sugar_Smarty();
$sugarSmarty->assign('SEARCH_MODULE', $module);
$sugarSmarty->assign('MOD', $saved_search_mod_strings);
$sugarSmarty->assign('DELETE', $app_strings['LBL_DELETE_BUTTON_LABEL']);
$sugarSmarty->assign('UPDATE', $app_strings['LBL_UPDATE']);
$sugarSmarty->assign('SAVE', $app_strings['LBL_SAVE_BUTTON_LABEL']);
// Column Chooser
$chooser = new TemplateGroupChooser();
$chooser->args['id'] = 'edit_tabs';
$chooser->args['left_size'] = 7;
$chooser->args['right_size'] = 7;
$chooser->args['values_array'][0] = array();
$chooser->args['values_array'][1] = array();
if (isset($_REQUEST['saved_search_select']) && $_REQUEST['saved_search_select'] != '_none') {
$this->retrieveSavedSearch($_REQUEST['saved_search_select']);
}
if (!empty($_REQUEST['displayColumns']) && $_REQUEST['displayColumns'] != 'undefined' || isset($this->contents['displayColumns']) && $this->contents['displayColumns'] != 'undefined') {
// columns to display
if (!empty($_REQUEST['displayColumns']) && $_REQUEST['displayColumns'] != 'undefined') {
$temp_displayColumns = $_REQUEST['displayColumns'];
} else {
$temp_displayColumns = $this->contents['displayColumns'];
}
foreach (explode('|', $temp_displayColumns) as $num => $name) {
if (!isset($this->columns[$name])) {
// Ignore any column that is not on the list.
continue;
}
$chooser->args['values_array'][0][$name] = trim(translate($this->columns[$name]['label'], $module), ':');
}
// columns not displayed
foreach (array_diff(array_keys($this->columns), array_values(explode('|', $temp_displayColumns))) as $num => $name) {
$chooser->args['values_array'][1][$name] = trim(translate($this->columns[$name]['label'], $module), ':');
}
} else {
foreach ($this->columns as $name => $val) {
if (!empty($val['default']) && $val['default']) {
$chooser->args['values_array'][0][$name] = trim(translate($val['label'], $module), ':');
} else {
$chooser->args['values_array'][1][$name] = trim(translate($val['label'], $module), ':');
}
}
}
if (!empty($_REQUEST['sortOrder'])) {
$this->sortOrder = $_REQUEST['sortOrder'];
}
if (!empty($_REQUEST['orderBy'])) {
$this->orderBy = $_REQUEST['orderBy'];
}
$chooser->args['left_name'] = 'display_tabs';
$chooser->args['right_name'] = 'hide_tabs';
$chooser->args['alt_tip'] = $app_strings['LBL_SORT'];
$chooser->args['left_label'] = $app_strings['LBL_DISPLAY_COLUMNS'];
$chooser->args['right_label'] = $app_strings['LBL_HIDE_COLUMNS'];
$chooser->args['title'] = '';
$sugarSmarty->assign('columnChooser', $chooser->display());
$sugarSmarty->assign('selectedOrderBy', $this->orderBy);
if (empty($this->sortOrder)) {
$this->sortOrder = 'ASC';
}
$sugarSmarty->assign('selectedSortOrder', $this->sortOrder);
$lastSavedView = empty($_SESSION['LastSavedView'][$module]) ? '' : $_SESSION['LastSavedView'][$module];
$sugarSmarty->assign('columnsMeta', $json->encode($this->columns));
$sugarSmarty->assign('lastSavedView', $lastSavedView);
$sugarSmarty->assign('SAVED_SEARCHES_OPTIONS', get_select_options_with_id($savedSearchArray, $lastSavedView));
$json = getJSONobj();
return $sugarSmarty->fetchCustom('modules/SavedSearch/SavedSearchForm.tpl');
}
示例2: getClassicModuleTitle
global $theme;
$sugar_smarty->assign('theme', $theme);
$sugar_smarty->assign('divPages', $divPages);
$sugar_smarty->assign('activePage', $activePage);
$sugar_smarty->assign('numCols', $pages[$activePage]['numColumns']);
$sugar_smarty->assign('default', $defaultHomepage);
$sugar_smarty->assign('current_user', $current_user->id);
$sugar_smarty->assign('lblAdd', $GLOBALS['app_strings']['LBL_ADD_BUTTON']);
$sugar_smarty->assign('lblAddDashlets', $GLOBALS['app_strings']['LBL_ADD_DASHLETS']);
$sugar_smarty->assign('lblLnkHelp', $GLOBALS['app_strings']['LNK_HELP']);
$sugar_smarty->assign('lblAddPage', $GLOBALS['app_strings']['LBL_ADD_PAGE']);
$sugar_smarty->assign('lblPageName', $GLOBALS['app_strings']['LBL_PAGE_NAME']);
$sugar_smarty->assign('lblChangeLayout', $GLOBALS['app_strings']['LBL_CHANGE_LAYOUT']);
$sugar_smarty->assign('lblNumberOfColumns', $GLOBALS['app_strings']['LBL_NUMBER_OF_COLUMNS']);
$sugar_smarty->assign('lbl1Column', $GLOBALS['app_strings']['LBL_1_COLUMN']);
$sugar_smarty->assign('lbl2Column', $GLOBALS['app_strings']['LBL_2_COLUMN']);
$sugar_smarty->assign('lbl3Column', $GLOBALS['app_strings']['LBL_3_COLUMN']);
$sugar_smarty->assign('form_header', getClassicModuleTitle("Home", array(), false));
$sugar_smarty->assign('mod', return_module_language($GLOBALS['current_language'], 'Home'));
$sugar_smarty->assign('app', $GLOBALS['app_strings']);
$sugar_smarty->assign('module', 'Home');
//custom chart code
require_once 'include/SugarCharts/SugarChartFactory.php';
$sugarChart = SugarChartFactory::getInstance();
$resources = $sugarChart->getChartResources();
$mySugarResources = $sugarChart->getMySugarChartResources();
$sugar_smarty->assign('chartResources', $resources);
$sugar_smarty->assign('mySugarChartResources', $mySugarResources);
echo $sugar_smarty->fetchCustom('include/MySugar/tpls/MySugar.tpl');
//init the quickEdit listeners after the dashlets have loaded on home page the first time
echo "<script>if(typeof(qe_init) != 'undefined'){qe_init();}</script>";
示例3: menu
function menu($module, $offset, $isAuditEnabled, $saveAndContinue = false)
{
$html_text = "";
if ($offset < 0) {
$offset = 0;
}
//this check if require in cases when you visit the edit view before visiting that modules list view.
//you can do this easily either from home, activities or sitemap.
$stored_vcr_query = SugarVCR::retrieve($module);
// bug 15893 - only show VCR if called as an element in a set of records
if (!empty($_REQUEST['record']) and !empty($stored_vcr_query) and isset($_REQUEST['offset']) and (empty($_REQUEST['isDuplicate']) or $_REQUEST['isDuplicate'] == 'false')) {
//syncing with display offset;
$offset++;
$action = !empty($_REQUEST['action']) ? $_REQUEST['action'] : 'EditView';
$menu = SugarVCR::play($module, $offset);
$list_link = '';
if ($saveAndContinue && !empty($menu['NEXT'])) {
$list_link = ajaxLink('index.php?action=' . $action . '&module=' . $module . '&record=' . $menu['NEXT'] . '&offset=' . ($offset + 1));
}
$previous_link = "";
if (!empty($menu['PREV'])) {
$previous_link = ajaxLink('index.php?module=' . $module . '&action=' . $action . '&offset=' . ($offset - 1) . '&record=' . $menu['PREV']);
}
$next_link = "";
if (!empty($menu['NEXT'])) {
$next_link = ajaxLink('index.php?module=' . $module . '&action=' . $action . '&offset=' . ($offset + 1) . '&record=' . $menu['NEXT']);
}
$ss = new Sugar_Smarty();
$ss->assign('app_strings', $GLOBALS['app_strings']);
$ss->assign('module', $module);
$ss->assign('action', $action);
$ss->assign('menu', $menu);
$ss->assign('list_link', $list_link);
$ss->assign('previous_link', $previous_link);
$ss->assign('next_link', $next_link);
$ss->assign('offset', $offset);
$ss->assign('total', '');
$ss->assign('plus', '');
if (!empty($_SESSION[$module . 'total'])) {
$ss->assign('total', $_SESSION[$module . 'total']);
if (!empty($GLOBALS['sugar_config']['disable_count_query']) && ($_SESSION[$module . 'total'] - 1) % $GLOBALS['sugar_config']['list_max_entries_per_page'] == 0) {
$ss->assign('plus', '+');
}
}
$html_text .= $ss->fetchCustom('include/EditView/SugarVCR.tpl');
}
return $html_text;
}
示例4: getCurrentURL
//go to the support portal if the file is not found.
// FG - Bug 39820 - Devs can write help files also in english, so skip check for language not equals "en_us" !
if (!empty($helpPath)) {
$sugar_smarty = new Sugar_Smarty();
$sugar_smarty->assign('helpFileExists', TRUE);
$sugar_smarty->assign('MOD', $mod_strings);
$sugar_smarty->assign('modulename', $send_module);
$sugar_smarty->assign('helpPath', $helpPath);
$sugar_smarty->assign('currentURL', getCurrentURL());
$sugar_smarty->assign('title', $mod_strings['LBL_SUGARCRM_HELP'] . " - " . $send_module);
$sugar_smarty->assign('styleSheet', SugarThemeRegistry::current()->getCSS());
$sugar_smarty->assign('table', "<table class='tabForm'><tr><td>");
$sugar_smarty->assign('endtable', "</td></tr></table>");
$sugar_smarty->assign('charset', $app_strings['LBL_CHARSET']);
$sugar_smarty->assign('langHeader', get_language_header());
echo $sugar_smarty->fetchCustom('modules/Administration/SupportPortal.tpl');
} else {
if (empty($send_module)) {
$send_module = 'toc';
}
$dev_status = 'GA';
//If there is an alphabetic portion between the decimal prefix and integer suffix, then use the
//value there as the dev_status value
$dev_status = getVersionStatus($GLOBALS['sugar_version']);
$send_version = getMajorMinorVersion($GLOBALS['sugar_version']);
$editionMap = array('ENT' => 'Enterprise', 'PRO' => 'Professional', 'CE' => 'Community_Edition');
if (!empty($editionMap[$send_edition])) {
$send_edition = $editionMap[$send_edition];
}
//map certain modules
$sendModuleMap = array('administration' => array(array('name' => 'Administration', 'action' => 'supportportal', 'anchor' => '1910574'), array('name' => 'Administration', 'action' => 'updater', 'anchor' => '1910574'), array('name' => 'Administration', 'action' => 'licensesettings', 'anchor' => '1910574'), array('name' => 'Administration', 'action' => 'diagnostic', 'anchor' => '1111949'), array('name' => 'Administration', 'action' => 'listviewofflineclient', 'anchor' => '1111949'), array('name' => 'Administration', 'action' => 'enablewirelessmodules', 'anchor' => '1111949'), array('name' => 'Administration', 'action' => 'backups', 'anchor' => '1111949'), array('name' => 'Administration', 'action' => 'upgrade', 'anchor' => '1111949'), array('name' => 'Administration', 'action' => 'locale', 'anchor' => '1111949'), array('name' => 'Administration', 'action' => 'passwordmanager', 'anchor' => '1446494'), array('name' => 'Administration', 'action' => 'upgradewizard', 'anchor' => '1168410'), array('name' => 'Administration', 'action' => 'configuretabs', 'anchor' => '1168410'), array('name' => 'Administration', 'action' => 'configuresubpanels', 'anchor' => '1168410'), array('name' => 'Administration', 'action' => 'wizard', 'anchor' => '1168410')), 'calls' => array(array('name' => 'Activities')), 'tasks' => array(array('name' => 'Activities')), 'meetings' => array(array('name' => 'Activities')), 'notes' => array(array('name' => 'Activities')), 'calendar' => array(array('name' => 'Activities')), 'configurator' => array(array('name' => 'Administration', 'anchor' => '1878359')), 'upgradewizard' => array(array('name' => 'Administration', 'anchor' => '1878359')), 'schedulers' => array(array('name' => 'Administration', 'anchor' => '1878359')), 'connectors' => array(array('name' => 'Administration', 'anchor' => '1878359')), 'trackers' => array(array('name' => 'Administration', 'anchor' => '1878359')), 'currencies' => array(array('name' => 'Administration', 'anchor' => '1878359')), 'aclroles' => array(array('name' => 'Administration', 'anchor' => '1916499')), 'roles' => array(array('name' => 'Administration', 'anchor' => '1916499')), 'teams' => array(array('name' => 'Administration', 'anchor' => '1916499')), 'users' => array(array('name' => 'Administration', 'anchor' => '1916499'), array('name' => 'Administration', 'action' => 'detailview', 'anchor' => '1916518')), 'modulebuilder' => array(array('name' => 'Administration', 'anchor' => '1168410')), 'studio' => array(array('name' => 'Administration', 'anchor' => '1168410')), 'workflow' => array(array('name' => 'Administration', 'anchor' => '1168410')), 'producttemplates' => array(array('name' => 'Administration', 'anchor' => '1957376')), 'productcategories' => array(array('name' => 'Administration', 'anchor' => '1957376')), 'producttypes' => array(array('name' => 'Administration', 'anchor' => '1957376')), 'manufacturers' => array(array('name' => 'Administration', 'anchor' => '1957376')), 'shippers' => array(array('name' => 'Administration', 'anchor' => '1957376')), 'taxrates' => array(array('name' => 'Administration', 'anchor' => '1957376')), 'releases' => array(array('name' => 'Administration', 'anchor' => '1868932')), 'timeperiods' => array(array('name' => 'Administration', 'anchor' => '1957639')), 'contracttypes' => array(array('name' => 'Administration', 'anchor' => '1957677')), 'contracttype' => array(array('name' => 'Administration', 'anchor' => '1957677')), 'emailman' => array(array('name' => 'Administration', 'anchor' => '1445484')), 'inboundemail' => array(array('name' => 'Administration', 'anchor' => '1445484')), 'emailtemplates' => array(array('name' => 'Emails')), 'prospects' => array(array('name' => 'Campaigns')), 'prospectlists' => array(array('name' => 'Campaigns')), 'reportmaker' => array(array('name' => 'Reports')), 'customqueries' => array(array('name' => 'Reports')), 'quotas' => array(array('name' => 'Forecasts')), 'projecttask' => array(array('name' => 'Projects')), 'project' => array(array('name' => 'Projects'), array('name' => 'Dashboard', 'action' => 'dashboard')), 'projecttemplate' => array(array('name' => 'Projects')), 'datasets' => array(array('name' => 'Reports')), 'dataformat' => array(array('name' => 'Reports')), 'employees' => array(array('name' => 'Administration', 'anchor' => '1957677')), 'kbdocuments' => array(array('name' => 'Administration', 'action' => 'kbadminview', 'anchor' => '1957677')));