本文整理汇总了PHP中SugarView类的典型用法代码示例。如果您正苦于以下问题:PHP SugarView类的具体用法?PHP SugarView怎么用?PHP SugarView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SugarView类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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();
}
示例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;
}
示例4: ViewMacro
function ViewMacro()
{
parent::SugarView();
$this->connection = getZendeskConnection();
$this->bean = new zd_Tickets();
$this->bean->load_from_db($_REQUEST['record']);
}
示例5: __construct
/**
* Constructor.
*/
public function __construct()
{
parent::SugarView();
$this->options['show_header'] = false;
$this->options['show_footer'] = false;
$this->options['show_javascript'] = false;
}
示例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();
}
}
示例7: _getModuleTab
/**
* @see SugarView::_getModuleTab()
*/
protected function _getModuleTab()
{
if (!empty($_REQUEST['merge_module'])) {
return $_REQUEST['merge_module'];
}
return parent::_getModuleTab();
}
示例8: __construct
public function __construct()
{
parent::SugarView();
// this request vars check in controller
$this->report_module = $_REQUEST['report_module'];
$this->record = $_REQUEST['record'];
}
示例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();
}
示例10: ViewEditFormula
function ViewEditFormula()
{
$this->options['show_footer'] = false;
if (isset($_REQUEST['embed']) && $_REQUEST['embed']) {
$this->options['show_header'] = false;
}
parent::SugarView();
}
示例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']);
}
}
示例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();
}
示例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();
}
示例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;
}
示例15: __construct
/**
* Constructor.
*/
public function __construct($bean = null, $view_object_map = array())
{
parent::__construct($bean, $view_object_map);
$this->options['show_header'] = false;
$this->options['show_footer'] = false;
$this->options['show_javascript'] = false;
}