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


PHP ListView::process_dynamic_listview方法代码示例

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


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

示例1: ProcessSubPanelListView

 function ProcessSubPanelListView($xTemplatePath, &$mod_strings)
 {
     global $app_strings;
     global $current_user;
     global $sugar_config;
     if (isset($this->listview)) {
         $ListView =& $this->listview;
     } else {
         $ListView = new ListView();
     }
     $ListView->initNewXTemplate($xTemplatePath, $this->subpanel_defs->mod_strings);
     $ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $this->parent_module . "&return_action=DetailView&return_id=" . $this->parent_bean->id);
     $ListView->xTemplateAssign("RELATED_MODULE", $this->parent_module);
     // TODO: what about unions?
     $ListView->xTemplateAssign("RECORD_ID", $this->parent_bean->id);
     $ListView->xTemplateAssign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline', 'align="absmiddle"  border="0"', null, null, '.gif', $app_strings['LNK_EDIT']));
     $ListView->xTemplateAssign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LBL_DELETE_INLINE']));
     $ListView->xTemplateAssign("REMOVE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LBL_ID_FF_REMOVE']));
     $header_text = '';
     $ListView->xTemplateAssign("SUBPANEL_ID", $this->subpanel_id);
     $ListView->xTemplateAssign("SUBPANEL_SEARCH", $this->getSearchForm());
     $display_sps = '';
     if ($this->search_query == '' && empty($this->collections)) {
         $display_sps = 'display:none';
     }
     $ListView->xTemplateAssign("DISPLAY_SPS", $display_sps);
     if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
         $exploded = explode('/', $xTemplatePath);
         $file_name = $exploded[sizeof($exploded) - 1];
         $mod_name = $exploded[sizeof($exploded) - 2];
         $header_text = "&nbsp;<a href='index.php?action=index&module=DynamicLayout&from_action={$file_name}&from_module={$mod_name}&mod_lang=" . $_REQUEST['module'] . "'>" . SugarThemeRegistry::current()->getImage("EditLayout", "border='0' align='bottom'", null, null, '.gif', 'Edit Layout') . "</a>";
     }
     $ListView->setHeaderTitle('');
     $ListView->setHeaderText('');
     ob_start();
     $ListView->is_dynamic = true;
     $ListView->records_per_page = $sugar_config['list_max_entries_per_subpanel'] + 0;
     if (isset($this->subpanel_defs->_instance_properties['records_per_page'])) {
         $ListView->records_per_page = $this->subpanel_defs->_instance_properties['records_per_page'] + 0;
     }
     $ListView->start_link_wrapper = "javascript:showSubPanel('" . $this->subpanel_id . "','";
     $ListView->subpanel_id = $this->subpanel_id;
     $ListView->end_link_wrapper = "',true);";
     if (!empty($this->layout_def_key)) {
         $ListView->end_link_wrapper = '&layout_def_key=' . $this->layout_def_key . $ListView->end_link_wrapper;
     }
     $where = '';
     $ListView->setQuery($where, '', '', '');
     $ListView->show_export_button = false;
     //function returns the query that was used to populate sub-panel data.
     $query = $ListView->process_dynamic_listview($this->parent_module, $this->parent_bean, $this->subpanel_defs);
     $this->subpanel_query = $query;
     $ob_contents = ob_get_contents();
     ob_end_clean();
     return $ob_contents;
 }
开发者ID:recci,项目名称:SuiteCRM,代码行数:56,代码来源:SubPanel.php

示例2: ProcessSubPanelListView

 function ProcessSubPanelListView($xTemplatePath, &$mod_strings)
 {
     global $app_strings;
     global $image_path;
     global $current_user;
     global $sugar_config;
     if (isset($this->listview)) {
         $ListView =& $this->listview;
     } else {
         $ListView = new ListView();
     }
     $ListView->initNewXTemplate($xTemplatePath, $this->subpanel_defs->mod_strings);
     $ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $this->parent_module . "&return_action=DetailView&return_id=" . $this->parent_bean->id);
     $ListView->xTemplateAssign("RELATED_MODULE", $this->parent_module);
     // TODO: what about unions?
     $ListView->xTemplateAssign("RECORD_ID", $this->parent_bean->id);
     $ListView->xTemplateAssign("EDIT_INLINE_PNG", get_image($image_path . 'edit_inline', 'align="absmiddle" alt="' . $app_strings['LNK_EDIT'] . '" border="0"'));
     $ListView->xTemplateAssign("DELETE_INLINE_PNG", get_image($image_path . 'delete_inline', 'align="absmiddle" alt="' . $app_strings['LNK_DELETE'] . '" border="0"'));
     $ListView->xTemplateAssign("REMOVE_INLINE_PNG", get_image($image_path . 'delete_inline', 'align="absmiddle" alt="' . $app_strings['LNK_REMOVE'] . '" border="0"'));
     $header_text = '';
     if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
         $exploded = explode('/', $xTemplatePath);
         $file_name = $exploded[sizeof($exploded) - 1];
         $mod_name = $exploded[sizeof($exploded) - 2];
         $header_text = "&nbsp;<a href='index.php?action=index&module=DynamicLayout&from_action={$file_name}&from_module={$mod_name}&mod_lang=" . $_REQUEST['module'] . "'>" . get_image($image_path . "EditLayout", "border='0' alt='Edit Layout' align='bottom'") . "</a>";
     }
     $ListView->setHeaderTitle('');
     $ListView->setHeaderText('');
     ob_start();
     $ListView->is_dynamic = true;
     $ListView->records_per_page = $sugar_config['list_max_entries_per_subpanel'] + 0;
     $ListView->start_link_wrapper = "javascript:showSubPanel('" . $this->subpanel_id . "','";
     $ListView->subpanel_id = $this->subpanel_id;
     $ListView->end_link_wrapper = "',true);";
     $where = '';
     $ListView->setQuery($where, '', '', '');
     $ListView->show_export_button = false;
     //function returns the query that was used to populate sub-panel data.
     $query = $ListView->process_dynamic_listview($this->parent_module, $this->parent_bean, $this->subpanel_defs);
     $this->subpanel_query = $query;
     $ob_contents = ob_get_contents();
     ob_end_clean();
     return $ob_contents;
 }
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:44,代码来源:SubPanel.php


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