当前位置: 首页>>代码示例>>PHP>>正文


PHP SubPanel::ProcessSubPanelListView方法代码示例

本文整理汇总了PHP中SubPanel::ProcessSubPanelListView方法的典型用法代码示例。如果您正苦于以下问题:PHP SubPanel::ProcessSubPanelListView方法的具体用法?PHP SubPanel::ProcessSubPanelListView怎么用?PHP SubPanel::ProcessSubPanelListView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SubPanel的用法示例。


在下文中一共展示了SubPanel::ProcessSubPanelListView方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: display


//.........这里部分代码省略.........
                 }
             } else {
                 $rel_name = '';
                 if (isset($this->focus->field_defs[$thisPanel->_instance_properties['get_subpanel_data']]['relationship'])) {
                     $rel_name = $this->focus->field_defs[$thisPanel->_instance_properties['get_subpanel_data']]['relationship'];
                 }
                 if (empty($rel_name) or !isset($GLOBALS['relationships'][$rel_name])) {
                     $GLOBALS['log']->fatal("Missing relationship definition " . $rel_name . ". skipping " . $tab . " subpanel");
                     continue;
                 }
             }
         }
         if ($thisPanel->isCollection()) {
             // collect names of sub-panels that may contain items of each module
             $collection_list = $thisPanel->get_inst_prop_value('collection_list');
             if (is_array($collection_list)) {
                 foreach ($collection_list as $data) {
                     if (!empty($data['module'])) {
                         $module_sub_panels[$data['module']][$tab] = true;
                     }
                 }
             }
         } else {
             $module = $thisPanel->get_module_name();
             if (!empty($module)) {
                 $module_sub_panels[$module][$tab] = true;
             }
         }
         $display = 'none';
         $div_display = $default_div_display;
         $cookie_name = $tab . '_v';
         if (isset($thisPanel->_instance_properties['collapsed']) && $thisPanel->_instance_properties['collapsed']) {
             $div_display = 'none';
         }
         if (isset($div_cookies[$cookie_name])) {
             // If defaultSubPanelExpandCollapse is set, ignore the cookie that remembers whether the panel is expanded or collapsed.
             // To be used with the above 'collapsed' metadata setting so they will always be set the same when the page is loaded.
             if (!isset($sugar_config['defaultSubPanelExpandCollapse']) || $sugar_config['defaultSubPanelExpandCollapse'] == false) {
                 $div_display = $div_cookies[$cookie_name];
             }
         }
         if (!empty($sugar_config['hide_subpanels']) or $thisPanel->isDefaultHidden()) {
             $div_display = 'none';
         }
         if ($div_display == 'none') {
             $opp_display = 'inline';
             $tabs_properties[$t]['expanded_subpanels'] = false;
         } else {
             $opp_display = 'none';
             $tabs_properties[$t]['expanded_subpanels'] = true;
         }
         if (!empty($this->layout_def_key)) {
             $layout_def_key = $this->layout_def_key;
         } else {
             $layout_def_key = '';
         }
         if (empty($this->show_tabs)) {
             ///
             /// Legacy Support for subpanels
             $show_icon_html = SugarThemeRegistry::current()->getImage('advanced_search', 'border="0" align="absmiddle"', null, null, '.gif', translate('LBL_SHOW'));
             $hide_icon_html = SugarThemeRegistry::current()->getImage('basic_search', 'border="0" align="absmiddle"', null, null, '.gif', translate('LBL_HIDE'));
             $tabs_properties[$t]['show_icon_html'] = $show_icon_html;
             $tabs_properties[$t]['hide_icon_html'] = $hide_icon_html;
             $max_min = "<a name=\"{$tab}\"> </a><span id=\"show_link_" . $tab . "\" style=\"display: {$opp_display}\"><a href='#' class='utilsLink' onclick=\"current_child_field = '" . $tab . "';showSubPanel('" . $tab . "',null,null,'" . $layout_def_key . "');document.getElementById('show_link_" . $tab . "').style.display='none';document.getElementById('hide_link_" . $tab . "').style.display='';return false;\">" . "" . $show_icon_html . "</a></span>";
             $max_min .= "<span id=\"hide_link_" . $tab . "\" style=\"display: {$div_display}\"><a href='#' class='utilsLink' onclick=\"hideSubPanel('" . $tab . "');document.getElementById('hide_link_" . $tab . "').style.display='none';document.getElementById('show_link_" . $tab . "').style.display='';return false;\">" . "" . $hide_icon_html . "</a></span>";
             $tabs_properties[$t]['title'] = $thisPanel->get_title();
             $tabs_properties[$t]['module_name'] = $thisPanel->get_module_name();
             $tabs_properties[$t]['get_form_header'] = get_form_header($thisPanel->get_title(), $max_min, false, false);
         }
         $tabs_properties[$t]['cookie_name'] = $cookie_name;
         $tabs_properties[$t]['div_display'] = $div_display;
         $tabs_properties[$t]['opp_display'] = $opp_display;
         // Get Subpanel
         include_once 'include/SubPanel/SubPanel.php';
         $subpanel_object = new SubPanel($this->module, $_REQUEST['record'], $tab, $thisPanel, $layout_def_key);
         $arr = array();
         // TODO: Remove x-template:
         $tabs_properties[$t]['subpanel_body'] = $subpanel_object->ProcessSubPanelListView('include/SubPanel/SubPanelDynamic.html', $arr);
         // Get subpanel buttons
         $tabs_properties[$t]['buttons'] = $this->get_buttons($thisPanel, $subpanel_object->subpanel_query);
         array_push($tab_names, $tab);
     }
     $tab_names = '["' . join($tab_names, '","') . '"]';
     $module_sub_panels = array_map('array_keys', $module_sub_panels);
     $module_sub_panels = json_encode($module_sub_panels);
     $template->assign('layout_def_key', $this->layout_def_key);
     $template->assign('show_subpanel_tabs', $this->show_tabs);
     $template->assign('subpanel_tabs', $tabs);
     $template->assign('subpanel_tabs_properties', $tabs_properties);
     $template->assign('module_sub_panels', $module_sub_panels);
     $template->assign('sugar_config', $sugar_config);
     $template->assign('REQUEST', $_REQUEST);
     $template->assign('GLOBALS', $GLOBALS);
     $template->assign('selected_group', $selected_group);
     $template->assign('tab_names', $tab_names);
     $template->assign('module_sub_panels', $module_sub_panels);
     $template->assign('module', $this->module);
     $template_body = $template->fetch('include/SubPanel/tpls/SubPanelTiles.tpl');
     return $template_header . $template_body . $template_footer;
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:101,代码来源:SubPanelTiles.php


注:本文中的SubPanel::ProcessSubPanelListView方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。