本文整理汇总了PHP中SugarView类的典型用法代码示例。如果您正苦于以下问题:PHP SugarView类的具体用法?PHP SugarView怎么用?PHP SugarView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SugarView类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: get_module_view_defs
function get_module_view_defs($moduleName, $type, $view)
{
require_once 'include/MVC/View/SugarView.php';
$metadataFile = null;
$results = array();
if (empty($moduleName)) {
return $results;
}
$view = strtolower($view);
if ($view == 'subpanel') {
$results = $this->get_subpanel_defs($moduleName, $type);
} else {
$v = new SugarView(null, array());
$v->module = $moduleName;
$v->type = $view;
$fullView = ucfirst($view) . 'View';
$metadataFile = $v->getMetaDataFile();
require_once $metadataFile;
if ($view == 'list') {
$results = $listViewDefs[$moduleName];
} else {
$results = $viewdefs[$moduleName][$fullView];
}
}
//Add field level acls.
$results = $this->addFieldLevelACLs($moduleName, $type, $view, $results);
return $results;
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:28,代码来源:SugarWebServiceUtilv4.php
示例2: display
function display()
{
$GLOBALS['system_notification_buffer'] = array();
$GLOBALS['buffer_system_notifications'] = true;
$GLOBALS['system_notification_count'] = 0;
$sv = new SugarView();
$sv->includeClassicFile('modules/Administration/DisplayWarnings.php');
echo $this->_formatNotificationsForQuickDisplay($GLOBALS['system_notification_buffer'], "modules/Notifications/tpls/systemQuickView.tpl");
$this->clearFTSFlags();
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:10,代码来源:view.systemquicklist.php
示例3: get_module_view_defs
function get_module_view_defs($moduleName, $type, $view)
{
require_once 'include/MVC/View/SugarView.php';
$metadataFile = null;
$results = array();
if (empty($moduleName)) {
return $results;
}
$view = strtolower($view);
switch (strtolower($type)) {
case 'wireless':
if ($view == 'list') {
require_once 'include/SugarWireless/SugarWirelessListView.php';
$GLOBALS['module'] = $moduleName;
//WirelessView keys off global variable not instance variable...
$v = new SugarWirelessListView();
$results = $v->getMetaDataFile();
$results = self::formatWirelessListViewResultsToArray($results);
} elseif ($view == 'subpanel') {
$results = $this->get_subpanel_defs($moduleName, $type);
} else {
require_once 'include/SugarWireless/SugarWirelessView.php';
$v = new SugarWirelessView();
$v->module = $moduleName;
$fullView = ucfirst($view) . 'View';
$meta = $v->getMetaDataFile('Wireless' . $fullView);
$metadataFile = $meta['filename'];
require $metadataFile;
//Wireless detail metadata may actually be just edit metadata.
$results = isset($viewdefs[$meta['module_name']][$fullView]) ? $viewdefs[$meta['module_name']][$fullView] : $viewdefs[$meta['module_name']]['EditView'];
}
break;
case 'default':
default:
if ($view == 'subpanel') {
$results = $this->get_subpanel_defs($moduleName, $type);
} else {
$v = new SugarView(null, array());
$v->module = $moduleName;
$v->type = $view;
$fullView = ucfirst($view) . 'View';
$metadataFile = $v->getMetaDataFile();
require_once $metadataFile;
if ($view == 'list') {
$results = $listViewDefs[$moduleName];
} else {
$results = $viewdefs[$moduleName][$fullView];
}
}
}
//Add field level acls.
$results = $this->addFieldLevelACLs($moduleName, $type, $view, $results);
return $results;
}
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:54,代码来源:SugarWebServiceUtilv4.php
示例4: ViewMacro
function ViewMacro()
{
parent::SugarView();
$this->connection = getZendeskConnection();
$this->bean = new zd_Tickets();
$this->bean->load_from_db($_REQUEST['record']);
}
开发者ID:nunoabc,项目名称:Web2,代码行数:7,代码来源:view.macro.php
示例5: __construct
/**
* Constructor.
*/
public function __construct()
{
parent::SugarView();
$this->options['show_header'] = false;
$this->options['show_footer'] = false;
$this->options['show_javascript'] = false;
}
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:10,代码来源:view.wizard.php
示例6: process
/**
* @see SugarView::process()
*/
public function process()
{
global $current_user;
if (!is_admin($current_user)) {
sugar_die("Unauthorized access to administration.");
}
// Check if default_theme is valid
if (isset($_REQUEST['default_theme']) && !in_array($_REQUEST['default_theme'], array_keys(SugarThemeRegistry::allThemes()))) {
sugar_die("Default theme is invalid.");
}
if (isset($_REQUEST['disabled_themes'])) {
$toDecode = html_entity_decode($_REQUEST['disabled_themes'], ENT_QUOTES);
$disabledThemes = json_decode($toDecode, true);
if (($key = array_search(SugarThemeRegistry::current()->__toString(), $disabledThemes)) !== FALSE) {
unset($disabledThemes[$key]);
}
$_REQUEST['disabled_themes'] = implode(',', $disabledThemes);
$configurator = new Configurator();
$configurator->config['disabled_themes'] = $_REQUEST['disabled_themes'];
$configurator->config['default_theme'] = $_REQUEST['default_theme'];
$configurator->handleOverride();
echo "true";
} else {
parent::process();
}
}
开发者ID:omusico,项目名称:sugar_work,代码行数:29,代码来源:view.themesettings.php
示例7: _getModuleTab
/**
* @see SugarView::_getModuleTab()
*/
protected function _getModuleTab()
{
if (!empty($_REQUEST['merge_module'])) {
return $_REQUEST['merge_module'];
}
return parent::_getModuleTab();
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:10,代码来源:view.step2.php
示例8: __construct
public function __construct()
{
parent::SugarView();
// this request vars check in controller
$this->report_module = $_REQUEST['report_module'];
$this->record = $_REQUEST['record'];
}
开发者ID:omusico,项目名称:sugar_work,代码行数:7,代码来源:view.getofficeform.php
示例9: __construct
public function __construct()
{
if (isset($_REQUEST['as_frame']) and $_REQUEST['as_frame'] == "true") {
$this->options = array('show_header' => true, 'show_title' => false, 'show_subpanels' => false, 'show_search' => false, 'show_footer' => false, 'show_javascript' => true, 'view_print' => true);
$this->showTitle = false;
}
parent::SugarView();
}
开发者ID:omusico,项目名称:sugar_work,代码行数:8,代码来源:view.showcode.php
示例10: ViewEditFormula
function ViewEditFormula()
{
$this->options['show_footer'] = false;
if (isset($_REQUEST['embed']) && $_REQUEST['embed']) {
$this->options['show_header'] = false;
}
parent::SugarView();
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:8,代码来源:view.editformula.php
示例11: ViewSugarpdf
function ViewSugarpdf()
{
parent::SugarView();
if (isset($_REQUEST["sugarpdf"])) {
$this->sugarpdf = $_REQUEST["sugarpdf"];
} else {
header('Location:index.php?module=' . $_REQUEST['module'] . '&action=DetailView&record=' . $_REQUEST['record']);
}
}
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:9,代码来源:view.sugarpdf.php
示例12: __construct
/**
* Constructor
*
* @see SugarView::SugarView()
*/
public function __construct()
{
$this->options['show_title'] = true;
$this->options['show_header'] = true;
$this->options['show_footer'] = true;
$this->options['show_javascript'] = true;
$this->options['show_subpanels'] = false;
$this->options['show_search'] = false;
parent::__construct();
}
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:15,代码来源:view.ajaxui.php
示例13: ViewAjax
/**
* Constructor
*
* @see SugarView::SugarView()
*/
public function ViewAjax()
{
$this->options['show_title'] = false;
$this->options['show_header'] = false;
$this->options['show_footer'] = false;
$this->options['show_javascript'] = false;
$this->options['show_subpanels'] = false;
$this->options['show_search'] = false;
parent::SugarView();
}
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:15,代码来源:view.ajax.php
示例14: getMenu
/**
* @see SugarView::getMenu()
*/
public function getMenu($module = null)
{
global $mod_strings, $current_language;
if (empty($module)) {
$module = $_REQUEST['import_module'];
}
$old_mod_strings = $mod_strings;
$mod_strings = return_module_language($current_language, $module);
$returnMenu = parent::getMenu($module);
$mod_strings = $old_mod_strings;
return $returnMenu;
}
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:15,代码来源:view.error.php
示例15: process
/**
* @see SugarView::process()
*/
public function process()
{
global $current_user;
if (is_admin($current_user) && isset($_REQUEST['disabled_themes'])) {
$_REQUEST['disabled_themes'] = explode(',', $_REQUEST['disabled_themes']);
if (($key = array_search(SugarThemeRegistry::current()->__toString(), $_REQUEST['disabled_themes'])) !== FALSE) {
unset($_REQUEST['disabled_themes'][$key]);
}
$_REQUEST['disabled_themes'] = implode(',', $_REQUEST['disabled_themes']);
$configurator = new Configurator();
$configurator->config['disabled_themes'] = $_REQUEST['disabled_themes'];
$configurator->handleOverride();
}
parent::process();
}
开发者ID:klr2003,项目名称:sourceread,代码行数:18,代码来源:view.themesettings.php
示例16: __construct
function __construct()
{
parent::SugarView();
global $current_user;
if (!$current_user->isDeveloperForModule("Leads")) {
die("Unauthorized Access to Administration");
}
$this->jsonHelper = getJSONobj();
$this->parser = new ConvertLayoutMetadataParser("Contacts");
if (isset($_REQUEST['updateConvertDef']) && $_REQUEST['updateConvertDef'] && !empty($_REQUEST['data'])) {
$this->parser->updateConvertDef(object_to_array_recursive($this->jsonHelper->decode(html_entity_decode_utf8($_REQUEST['data']))));
// clear the cache for this module only
MetaDataManager::refreshModulesCache(array('Leads'));
}
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:15,代码来源:view.editconvert.php
示例17: reg_invoicesViewAjaxmain
function reg_invoicesViewAjaxmain()
{
$this->options['show_title'] = false;
$this->options['show_header'] = false;
$this->options['show_footer'] = false;
$this->options['show_javascript'] = false;
$this->options['show_subpanels'] = false;
$this->options['show_search'] = false;
parent::SugarView();
$this->options['show_title'] = false;
$this->options['show_header'] = false;
$this->options['show_footer'] = false;
$this->options['show_javascript'] = false;
$this->options['show_subpanels'] = false;
$this->options['show_search'] = false;
}
开发者ID:pixprod,项目名称:Regoluna-Invoices-for-SugarCRM,代码行数:16,代码来源:view.ajaxmain.php
示例18: process
/**
* @see SugarView::process()
*/
public function process()
{
global $current_user;
if (!is_admin($current_user)) {
sugar_die("Unauthorized access to administration.");
}
// Check if default_theme is valid
if (isset($_REQUEST['default_theme']) && !in_array($_REQUEST['default_theme'], array_keys(SugarThemeRegistry::allThemes()))) {
sugar_die("Default theme is invalid.");
}
if (isset($_REQUEST['disabled_themes'])) {
$configurator = new Configurator();
$configurator->config['disabled_themes'] = implode(',', $_REQUEST['disabled_themes']);
$configurator->config['default_theme'] = $_REQUEST['default_theme'];
$configurator->handleOverride();
}
parent::process();
}
开发者ID:NALSS,项目名称:SuiteCRM,代码行数:21,代码来源:view.themesettings.php
示例19: ViewAssociated
function ViewAssociated()
{
parent::SugarView();
$zendesk_helper = new ZendeskHelper();
$this->focus = new $_REQUEST['focus']();
$this->focus = $this->focus->retrieve($_REQUEST['rec']);
$this->per_page = $zendesk_helper->getConfigValue('per_page', 6);
$this->sort = $zendesk_helper->getConfigValue('sort', '1') == 1 ? 'desc' : 'asc';
$this->order_by = $zendesk_helper->getConfigValue('order_by', 'priority');
$this->status_filter = $zendesk_helper->getConfigValue('status_filter', 'any');
$this->priority_filter = $zendesk_helper->getConfigValue('priority_filter', 'lsolved');
$this->type_filter = $zendesk_helper->getConfigValue('type_filter', 'any');
if ($_REQUEST['page']) {
$this->page = $_REQUEST['page'];
}
if ($_REQUEST['sort']) {
$this->sort = $_REQUEST['sort'];
}
if ($_REQUEST['order_by']) {
$this->order_by = $_REQUEST['order_by'];
}
if ($_REQUEST['status_filter']) {
$this->status_filter = $_REQUEST['status_filter'];
}
if ($_REQUEST['priority_filter']) {
$this->priority_filter = $_REQUEST['priority_filter'];
}
if ($_REQUEST['type_filter']) {
$this->type_filter = $_REQUEST['type_filter'];
}
$this->error_message = null;
try {
$this->connection = getZendeskConnection();
} catch (Exception $e) {
$this->error_message = $e->getMessage();
}
}
开发者ID:nunoabc,项目名称:Web2,代码行数:37,代码来源:view.associated.php
示例20: get_fts_list
function get_fts_list($qry_arr, $isMultiSelect = false, $ajaxSort = false)
{
global $current_language, $current_user;
global $urlPrefix, $currentModule, $theme;
$current_module_strings = return_module_language($current_language, 'KBDocuments');
// focus_list is the means of passing data to a ListView.
global $focus_list;
require_once 'include/ListView/ListViewSmarty.php';
$view = new SugarView();
$view->type = 'list';
$view->module = 'KBDocuments';
$metadataFile = $view->getMetaDataFile();
require_once $metadataFile;
require_once 'modules/KBDocuments/KBListViewData.php';
// clear the display columns back to default when clear query is called
if (!empty($_REQUEST['clear_query']) && $_REQUEST['clear_query'] == 'true') {
$current_user->setPreference('ListViewDisplayColumns', array(), 0, $currentModule);
}
$savedDisplayColumns = $current_user->getPreference('ListViewDisplayColumns', $currentModule);
// get user defined display columns
$json = getJSONobj();
$seedDocument = BeanFactory::getBean('KBDocuments');
// seed bean
// setup listview smarty
$lv = new ListViewSmarty();
$lv->lvd = new KBListViewData();
$displayColumns = array();
// check $_REQUEST if new display columns from post
if (!empty($_REQUEST['displayColumns'])) {
foreach (explode('|', $_REQUEST['displayColumns']) as $num => $col) {
if (!empty($listViewDefs['KBDocuments'][$col])) {
$displayColumns[$col] = $listViewDefs['KBDocuments'][$col];
}
}
} elseif (!empty($savedDisplayColumns)) {
// use user defined display columns from preferences
$displayColumns = $savedDisplayColumns;
} else {
// use columns defined in listviewdefs for default display columns
foreach ($listViewDefs['KBDocuments'] as $col => $params) {
if (!empty($params['default']) && $params['default']) {
$displayColumns[$col] = $params;
}
}
}
//disable mass update form
$params = array('massupdate' => false);
//process orderBy if set in request
if (!empty($_REQUEST['orderBy'])) {
$params['orderBy'] = $_REQUEST['orderBy'];
$params['overrideOrder'] = true;
if (!empty($_REQUEST['sortOrder'])) {
$params['sortOrder'] = $_REQUEST['sortOrder'];
}
}
//if ajax sort is set, then pass in param to display columns array that will change
//the sort urls to be javascript based within tpl
if ($ajaxSort) {
foreach ($displayColumns as $col => $coldata) {
$coldata['ajaxSort'] = true;
$displayColumns[$col] = $coldata;
}
}
$lv->displayColumns = $displayColumns;
//grab the where and custom from clauses from passed in query
$where = '';
//check to see if param is a string
if (is_string($qry_arr)) {
//only the where string is passed in, just populate the where
$where = $qry_arr;
} elseif (is_array($qry_arr)) {
//array was passed in, populate the where and custom_from
if (isset($qry_arr['where'])) {
$where = $qry_arr['where'];
}
if (isset($qry_arr['custom_from'])) {
$params['custom_from'] = $qry_arr['custom_from'];
}
}
if (!isset($where)) {
$where = "";
}
global $listViewDefs;
//disable some features.
$lv->multiSelect = $isMultiSelect;
$lv->lvd->additionalDetailsAjax = false;
$lv->export = false;
$lv->show_mass_update_form = false;
$lv->show_action_dropdown = false;
$lv->delete = false;
$lv->select = false;
$lv->setup($seedDocument, 'modules/KBDocuments/SearchListView.tpl', $where, $params);
$savedSearchName = empty($_REQUEST['saved_search_select_name']) ? '' : ' - ' . $_REQUEST['saved_search_select_name'];
//if this is a sort from browse tab, then set the ajaxsort flag to true
if ($ajaxSort) {
$lv->data['pageData']['urls']['ajaxSort'] = true;
}
//begin code that will remove single and double quotes for javascript use
$temp_Data = array();
//iterate through each record returned in list
//.........这里部分代码省略.........
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:101,代码来源:SearchUtils.php
注:本文中的SugarView类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论