本文整理汇总了PHP中get_module_title函数的典型用法代码示例。如果您正苦于以下问题:PHP get_module_title函数的具体用法?PHP get_module_title怎么用?PHP get_module_title使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_module_title函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
function display()
{
global $mod_strings, $app_strings;
require_once 'include/connectors/utils/ConnectorUtils.php';
require_once 'include/connectors/sources/SourceFactory.php';
$sugar_smarty = new Sugar_Smarty();
$sugar_smarty->assign('mod', $mod_strings);
$sugar_smarty->assign('APP', $app_strings);
$connectors = ConnectorUtils::getConnectors(true);
$required_fields = array();
//Get required fields for first connector only
foreach ($connectors as $id => $entry) {
$s = SourceFactory::getSource($id);
$connector_strings = ConnectorUtils::getConnectorStrings($id);
$fields = $s->getRequiredConfigFields();
foreach ($fields as $field_id) {
$label = isset($connector_strings[$field_id]) ? $connector_strings[$field_id] : $field_id;
$required_fields[$id][$field_id] = $label;
}
break;
}
$sugar_smarty->assign('SOURCES', $connectors);
$sugar_smarty->assign('REQUIRED_FIELDS', $required_fields);
echo get_module_title('Connectors', $mod_strings['LBL_MODIFY_PROPERTIES_PAGE_TITLE'], true);
$sugar_smarty->display('modules/Connectors/tpls/modify_properties.tpl');
}
示例2: display
/**
* display the form
*/
public function display()
{
global $mod_strings, $app_list_strings, $app_strings, $current_user;
$error = "";
if (!is_admin($current_user)) {
sugar_die('Admin Only');
}
$fontManager = new FontManager();
if (!$fontManager->listFontFiles()) {
$error = implode("<br>", $fontManager->errors);
}
$this->ss->assign("MODULE_TITLE", get_module_title($mod_strings['LBL_MODULE_ID'], $mod_strings['LBL_FONTMANAGER_TITLE'], false));
if (!empty($_REQUEST['error'])) {
$error .= "<br>" . $_REQUEST['error'];
}
$this->ss->assign("error", $error);
$this->ss->assign("MOD", $mod_strings);
$this->ss->assign("APP", $app_strings);
$this->ss->assign("JAVASCRIPT", $this->_getJS());
if (isset($_REQUEST['return_action'])) {
$this->ss->assign("RETURN_ACTION", $_REQUEST['return_action']);
} else {
$this->ss->assign("RETURN_ACTION", 'SugarpdfSettings');
}
$this->ss->assign("K_PATH_FONTS", K_PATH_FONTS);
// YUI List
$this->ss->assign("COLUMNDEFS", $this->getYuiColumnDefs($fontManager->fontList));
$this->ss->assign("DATASOURCE", $this->getYuiDataSource($fontManager->fontList));
$this->ss->assign("RESPONSESCHEMA", $this->getYuiResponseSchema());
//display
$this->ss->display('modules/Configurator/tpls/fontmanager.tpl');
}
示例3: display_error_import
function display_error_import()
{
$message = $_SESSION['import_error'];
global $import_mod_strings;
global $theme;
global $mod_strings;
global $app_strings;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
require_once $theme_path . 'layout_utils.php';
$GLOBALS['log']->info("Upload Error");
$xtpl = new XTemplate('modules/Import/error.html');
$xtpl->assign("MOD", $mod_strings);
$xtpl->assign("APP", $app_strings);
echo "\n<p>\n";
echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'], true);
echo "\n</p>\n";
if (isset($_REQUEST['return_module'])) {
$xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']);
}
if (isset($_REQUEST['return_action'])) {
$xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']);
}
$xtpl->assign("THEME", $theme);
$xtpl->assign("IMAGE_PATH", $image_path);
$xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']);
$xtpl->assign("MODULE", $_REQUEST['module']);
$xtpl->assign("MESSAGE", $message);
$xtpl->parse("main");
$xtpl->out("main");
}
示例4: display
function display()
{
global $mod_strings, $app_strings;
echo get_module_title('Connectors', $mod_strings['LBL_ADMINISTRATION_MAIN'], true);
$sugar_smarty = new Sugar_Smarty();
$sugar_smarty->assign('mod', $mod_strings);
$sugar_smarty->assign('app', $app_strings);
$sugar_smarty->assign('IMG', 'themes/default/images/');
$sugar_smarty->display('modules/Connectors/tpls/administration.tpl');
}
示例5: display
function display()
{
require_once 'include/connectors/utils/ConnectorUtils.php';
$sources = ConnectorUtils::getConnectors();
$this->ss->assign('SOURCES', $sources);
$this->ss->assign('mod', $GLOBALS['mod_strings']);
$this->ss->assign('APP', $GLOBALS['app_strings']);
$this->ss->assign('theme', $GLOBALS['theme']);
echo get_module_title('Connectors', $GLOBALS['mod_strings']['LBL_MODIFY_DISPLAY_PAGE_TITLE'], true);
$this->ss->display('modules/Connectors/tpls/modify_display.tpl');
}
示例6: display
/**
* @see SugarView::display()
*/
public function display()
{
global $mod_strings, $app_strings, $app_list_strings;
$this->ss->assign("ERROR_TEXT", $app_strings['LBL_EMPTY_VCARD']);
$this->ss->assign("HEADER", $app_strings['LBL_IMPORT_VCARD']);
$this->ss->assign("MODULE", $_REQUEST['module']);
echo get_module_title($mod_strings['LBL_MODULE_NAME'], $app_strings['LBL_IMPORT_VCARD'] . " " . $mod_strings['LBL_MODULE_NAME'], true);
if (file_exists('custom/include/MVC/View/tpls/Importvcard.tpl')) {
$this->ss->display('custom/include/MVC/View/tpls/Importvcard.tpl');
} else {
$this->ss->display('include/MVC/View/tpls/Importvcard.tpl');
}
}
示例7: display
function display()
{
require_once 'include/connectors/utils/ConnectorUtils.php';
require_once 'include/connectors/sources/SourceFactory.php';
global $mod_strings, $app_strings;
$sugar_smarty = new Sugar_Smarty();
$sugar_smarty->assign('mod', $mod_strings);
$sugar_smarty->assign('APP', $app_strings);
$connectors = ConnectorUtils::getConnectors(true);
$sugar_smarty->assign('SOURCES', $connectors);
echo get_module_title('Connectors', $mod_strings['LBL_MODIFY_MAPPING_PAGE_TITLE'], true);
$sugar_smarty->display('modules/Connectors/tpls/modify_mapping.tpl');
}
示例8: display
/**
* @see SugarView::display()
*/
public function display()
{
global $mod_strings, $app_strings, $app_list_strings;
$this->ss->assign("ERROR_TEXT", $app_strings['LBL_EMPTY_VCARD']);
$this->ss->assign("HEADER", $app_strings['LBL_IMPORT_VCARD']);
$this->ss->assign("MODULE", $_REQUEST['module']);
$middleText = "<a href='index.php?module={$_REQUEST['module']}&action=index'>{$mod_strings['LBL_MODULE_NAME']}</a><span class='pointer'>»</span>{$app_strings['LBL_IMPORT_VCARD_BUTTON_LABEL']}";
echo get_module_title($mod_strings['LBL_MODULE_NAME'], $middleText, true);
if (file_exists('custom/include/MVC/View/tpls/Importvcard.tpl')) {
$this->ss->display('custom/include/MVC/View/tpls/Importvcard.tpl');
} else {
$this->ss->display('include/MVC/View/tpls/Importvcard.tpl');
}
}
示例9: display
/**
* display the form
*/
public function display()
{
global $mod_strings, $app_list_strings, $app_strings, $current_user;
if (!is_admin($current_user)) {
sugar_die('Admin Only');
}
$error = $this->addFont();
$this->ss->assign("MODULE_TITLE", get_module_title($mod_strings['LBL_MODULE_ID'], $mod_strings['LBL_ADDFONTRESULT_TITLE'], false));
if ($error) {
$this->ss->assign("error", $this->log);
} else {
$this->ss->assign("info", $this->log);
}
$this->ss->assign("MOD", $mod_strings);
$this->ss->assign("APP", $app_strings);
//display
$this->ss->display('modules/Configurator/tpls/addFontResult.tpl');
}
示例10: display
function display()
{
global $mod_strings, $export_module, $current_language, $theme, $current_user;
echo get_module_title("Activities", $mod_strings['LBL_MODULE_TITLE'], true);
$mod_strings = return_module_language($current_language, 'Calls');
// Overload the export module since the user got here by clicking the "Activities" tab
$export_module = "Calls";
$_REQUEST['module'] = 'Calls';
$controller = ControllerFactory::getController('Calls');
$controller->loadBean();
$controller->preProcess();
$controller->process();
//Manipulate view directly to not display header, js and footer again
$view = ViewFactory::loadView($controller->view, $controller->module, $controller->bean, $controller->view_object_map);
$view->options['show_header'] = false;
$view->options['show_title'] = false;
$view->options['show_javascript'] = false;
$view->process();
die;
}
示例11: display
/**
* display the form
*/
public function display()
{
global $mod_strings, $app_list_strings, $app_strings, $current_user;
if (!is_admin($current_user)) {
sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']);
}
$this->ss->assign("MODULE_TITLE", get_module_title($mod_strings['LBL_MODULE_ID'], $mod_strings['LBL_ADDFONT_TITLE'], true));
if (!empty($_REQUEST['error'])) {
$this->ss->assign("error", $_REQUEST['error']);
}
$this->ss->assign("MOD", $mod_strings);
$this->ss->assign("APP", $app_strings);
if (isset($_REQUEST['return_action'])) {
$this->ss->assign("RETURN_ACTION", $_REQUEST['return_action']);
} else {
$this->ss->assign("RETURN_ACTION", 'FontManager');
}
$this->ss->assign("STYLE_LIST", array("regular" => $mod_strings["LBL_FONT_REGULAR"], "italic" => $mod_strings["LBL_FONT_ITALIC"], "bold" => $mod_strings["LBL_FONT_BOLD"], "boldItalic" => $mod_strings["LBL_FONT_BOLDITALIC"]));
$this->ss->assign("ENCODING_TABLE", array_combine(explode(",", PDF_ENCODING_TABLE_LIST), explode(",", PDF_ENCODING_TABLE_LABEL_LIST)));
//display
$this->ss->display('modules/Configurator/tpls/addFontView.tpl');
}
示例12: testget_module_title
public function testget_module_title()
{
//execute the method and test if it returns html and contains the values provided in parameters
//with show_create true, generates more html
$html1 = get_module_title('Users', 'Users Home', true);
$this->assertGreaterThan(0, strlen($html1));
$this->assertContains('Users', $html1);
$this->assertContains('Users Home', $html1);
//with show_create false, generates less html
$html2 = get_module_title('Users', 'Users Home', false);
$this->assertGreaterThan(0, strlen($html2));
$this->assertContains('Users', $html2);
$this->assertContains('Users Home', $html2);
$this->assertGreaterThan(strlen($html2), strlen($html1));
//with show_create flase and count > 1, generates more html compared to count =0
$html3 = get_module_title('Users', 'Users Home', false, 2);
$this->assertGreaterThan(0, strlen($html3));
$this->assertContains('Users', $html3);
$this->assertContains('Users Home', $html3);
$this->assertGreaterThan(strlen($html2), strlen($html3));
$this->assertGreaterThan(strlen($html3), strlen($html1));
}
示例13: Campaign
global $sugar_version, $sugar_config;
/*************** GENERAL SETUP WORK **********/
$focus = new Campaign();
if (isset($_REQUEST['record'])) {
$focus->retrieve($_REQUEST['record']);
}
if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
$focus->id = "";
}
global $theme;
$json = getJSONobj();
$GLOBALS['log']->info("Campaign NewsLetter Wizard");
if (isset($_REQUEST['wizardtype']) && $_REQUEST['wizardtype'] == 1 || $focus->campaign_type == 'NewsLetter') {
echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_NEWSLETTER WIZARD_TITLE'] . $focus->name, true);
} else {
echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_CAMPAIGN'] . $focus->name, true);
}
$ss = new Sugar_Smarty();
$ss->assign("MOD", $mod_strings);
$ss->assign("APP", $app_strings);
if (isset($_REQUEST['return_module'])) {
$ss->assign("RETURN_MODULE", $_REQUEST['return_module']);
}
if (isset($_REQUEST['return_action'])) {
$ss->assign("RETURN_ACTION", $_REQUEST['return_action']);
}
if (isset($_REQUEST['return_id'])) {
$ss->assign("RETURN_ID", $_REQUEST['return_id']);
}
// handle Create $module then Cancel
if (empty($_REQUEST['return_id'])) {
示例14: DocumentRevision
global $app_list_strings;
global $mod_strings;
global $current_user;
$focus = new DocumentRevision();
if (isset($_REQUEST['record'])) {
$focus->retrieve($_REQUEST['record']);
}
$old_id = '';
if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
if (!empty($focus->filename)) {
$old_id = $focus->id;
}
$focus->id = "";
}
echo "\n<p>\n";
echo get_module_title('DocumentRevisions', $mod_strings['LBL_MODULE_NAME'] . ": " . $focus->document_name, true);
echo "\n</p>\n";
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
require_once $theme_path . 'layout_utils.php';
$GLOBALS['log']->info("Document revision edit view");
$xtpl = new XTemplate('modules/DocumentRevisions/EditView.html');
$xtpl->assign("MOD", $mod_strings);
$xtpl->assign("APP", $app_strings);
if (isset($_REQUEST['return_module'])) {
$xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']);
}
if (isset($_REQUEST['return_action'])) {
$xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']);
}
示例15: process_page
//.........这里部分代码省略.........
//$sort_date_time=$timedate->handle_offset($sort_date_time,'Y-m-d H:i:s',true);
} elseif (!empty($call->date_start) && empty($call->time_start)) {
//jc - Bug#19862
//for some reason the calls module does not populate the time_start variable in
//this case, so the date_start attribute contains the information we need
//to determine where in the history this call belongs.
//using swap_formats to get from the format '03/31/2008 09:45pm' to the format
//'2008-03-31 09:45:00'
$sort_date_time = $timedate->swap_formats($call->date_start, $timedate->get_date_time_format(), $timedate->get_db_date_time_format());
}
$history_list[] = array('name' => $call->name, 'id' => $call->id, 'type' => "Call", 'direction' => $call->direction, 'module' => "Calls", 'status' => $call->status, 'parent_id' => $call->parent_id, 'parent_type' => $call->parent_type, 'parent_name' => $call->parent_name, 'contact_id' => $call->contact_id, 'contact_name' => $call->contact_name, 'date_modified' => $call->date_start, 'description' => $this->formatDescription($call->description), 'date_type' => $app_strings['DATA_TYPE_START'], 'sort_value' => $sort_date_time);
} else {
$open_activity_list[] = array('name' => $call->name, 'id' => $call->id, 'direction' => $call->direction, 'type' => "Call", 'module' => "Calls", 'status' => $call->status, 'parent_id' => $call->parent_id, 'parent_type' => $call->parent_type, 'parent_name' => $call->parent_name, 'contact_id' => $call->contact_id, 'contact_name' => $call->contact_name, 'date_due' => $call->date_start, 'description' => $this->formatDescription($call->description), 'date_type' => $app_strings['DATA_TYPE_START']);
}
}
// end Calls
foreach ($focus_emails_list as $email) {
$sort_date_time = '';
if (!empty($email->date_start) and !empty($email->time_start)) {
$sort_date_time = $timedate->to_db_date_time($email->date_start, $email->time_start);
$sort_date_time = implode(' ', $sort_date_time);
// kbrill - Bug #16714
//$sort_date_time=$timedate->handle_offset($sort_date_time,'Y-m-d H:i:s',true);
}
$history_list[] = array('name' => $email->name, 'id' => $email->id, 'type' => "Email", 'direction' => '', 'module' => "Emails", 'status' => '', 'parent_id' => $email->parent_id, 'parent_type' => $email->parent_type, 'parent_name' => $email->parent_name, 'contact_id' => $email->contact_id, 'contact_name' => $email->contact_name, 'date_modified' => $email->date_start . " " . $email->time_start, 'description' => $this->getEmailDetails($email), 'date_type' => $app_strings['DATA_TYPE_SENT'], 'sort_value' => $sort_date_time);
}
//end Emails
foreach ($focus_notes_list as $note) {
if (!empty($note->date_modified)) {
$sort_date_time = $timedate->swap_formats($note->date_modified, $timedate->get_date_time_format(), $timedate->get_db_date_time_format());
}
$history_list[] = array('name' => $note->name, 'id' => $note->id, 'type' => "Note", 'direction' => '', 'module' => "Notes", 'status' => '', 'parent_id' => $note->parent_id, 'parent_type' => $note->parent_type, 'parent_name' => $note->parent_name, 'contact_id' => $note->contact_id, 'contact_name' => $note->contact_name, 'date_modified' => $note->date_modified, 'description' => $this->formatDescription($note->description), 'date_type' => $app_strings['DATA_TYPE_MODIFIED'], 'sort_value' => $sort_date_time);
if (!empty($note->filename)) {
$count = count($history_list);
$count--;
$history_list[$count]['filename'] = $note->filename;
$history_list[$count]['fileurl'] = UploadFile::get_url($note->filename, $note->id);
}
}
// end Notes
$xtpl = new XTemplate('modules/Activities/Popup_picker.html');
$xtpl->assign('MOD', $mod_strings);
$xtpl->assign('APP', $app_strings);
insert_popup_header();
//output header
echo "<table width='100%' cellpadding='0' cellspacing='0'><tr><td>";
echo get_module_title($focus->module_dir, translate('LBL_MODULE_NAME', $focus->module_dir) . ": " . $focus->name, false);
echo "</td><td align='right' class='moduleTitle'>";
echo "<A href='javascript:print();' class='utilsLink'><img src='" . SugarThemeRegistry::current()->getImageURL("print.gif") . "' width='13' height='13' alt='" . $app_strings['LNK_PRINT'] . "' border='0' align='absmiddle'></a> <A href='javascript:print();' class='utilsLink'>" . $app_strings['LNK_PRINT'] . "</A>\n";
echo "</td></tr></table>";
$oddRow = true;
if (count($history_list) > 0) {
$history_list = array_csort($history_list, 'sort_value', SORT_DESC);
}
foreach ($history_list as $activity) {
$activity_fields = array('ID' => $activity['id'], 'NAME' => $activity['name'], 'MODULE' => $activity['module'], 'CONTACT_NAME' => $activity['contact_name'], 'CONTACT_ID' => $activity['contact_id'], 'PARENT_TYPE' => $activity['parent_type'], 'PARENT_NAME' => $activity['parent_name'], 'PARENT_ID' => $activity['parent_id'], 'DATE' => $activity['date_modified'], 'DESCRIPTION' => $activity['description'], 'DATE_TYPE' => $activity['date_type']);
if (empty($activity['direction'])) {
$activity_fields['TYPE'] = $app_list_strings['activity_dom'][$activity['type']];
} else {
$activity_fields['TYPE'] = $app_list_strings['call_direction_dom'][$activity['direction']] . ' ' . $app_list_strings['activity_dom'][$activity['type']];
}
switch ($activity['type']) {
case 'Call':
$activity_fields['STATUS'] = $app_list_strings['call_status_dom'][$activity['status']];
break;
case 'Meeting':
$activity_fields['STATUS'] = $app_list_strings['meeting_status_dom'][$activity['status']];
break;
case 'Task':
$activity_fields['STATUS'] = $app_list_strings['task_status_dom'][$activity['status']];
break;
}
if (isset($activity['location'])) {
$activity_fields['LOCATION'] = $activity['location'];
}
if (isset($activity['filename'])) {
$activity_fields['ATTACHMENT'] = "<a href='index.php?entryPoint=download&id=" . $activity['id'] . "&type=Notes' target='_blank'>" . SugarThemeRegistry::current()->getImage("attachment", "alt='" . $activity['filename'] . "' border='0' align='absmiddle'") . "</a>";
}
if (isset($activity['parent_type'])) {
$activity_fields['PARENT_MODULE'] = $activity['parent_type'];
}
$xtpl->assign("ACTIVITY", $activity_fields);
$xtpl->assign("ACTIVITY_MODULE_PNG", SugarThemeRegistry::current()->getImage($activity_fields['MODULE'] . '', 'border="0" alt="' . $activity_fields['NAME'] . '"'));
if ($oddRow) {
//todo move to themes
$xtpl->assign("ROW_COLOR", 'oddListRow');
$xtpl->assign("BG_COLOR", $odd_bg);
} else {
//todo move to themes
$xtpl->assign("ROW_COLOR", 'evenListRow');
$xtpl->assign("BG_COLOR", $even_bg);
}
$oddRow = !$oddRow;
$xtpl->parse("history.row");
// Put the rows in.
}
$xtpl->parse("history");
$xtpl->out("history");
insert_popup_footer();
}