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


PHP CostbenefitprojectionHelper::combine方法代码示例

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


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

示例1: display

 function display($tpl = null)
 {
     // get component params
     $this->params = JComponentHelper::getParams('com_costbenefitprojection');
     // get the application
     $this->app = JFactory::getApplication();
     // get the user object
     $this->user = JFactory::getUser();
     // get global action permissions
     $this->canDo = CostbenefitprojectionHelper::getActions('combinedresults');
     // Initialise variables.
     $this->items = $this->get('Items');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     // check if the data was returned
     if ($this->items) {
         // combine the results
         $this->results = CostbenefitprojectionHelper::combine($this->items);
         // set the companies names
         $this->names = $this->results->companiesNames;
         $this->item = new stdClass();
         $this->item->currency_name = $this->results->currencyDetails->currency_name;
         // set the tab details
         $this->chart_tabs = $this->getChartTabs();
         $this->table_tabs = $this->getTableTabs();
     } else {
         // int all as false
         $this->results = false;
         // set the companies names
         $this->names = JText::_('COM_COSTBENEFITPROJECTION_NONE_LOADED');
         $this->item = new stdClass();
         $this->item->currency_name = '';
         // set the tab details
         $this->chart_tabs = false;
         $this->table_tabs = false;
     }
     // We don't need toolbar in the modal window.
     if ($this->getLayout() !== 'modal') {
         // add the tool bar
         $this->addToolBar();
     }
     // set the document
     $this->setDocument();
     parent::display($tpl);
 }
开发者ID:namibia,项目名称:CBP-Joomla-3-Component,代码行数:48,代码来源:view.html.php

示例2: display

 function display($tpl = null)
 {
     // get combined params of both component and menu
     $this->app = JFactory::getApplication();
     $this->params = $this->app->getParams();
     $this->menu = $this->app->getMenu()->getActive();
     // get the user object
     $this->user = JFactory::getUser();
     // Initialise variables.
     $this->items = $this->get('Items');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     // check if the data was returned
     if ($this->items) {
         // combine the results
         $this->results = CostbenefitprojectionHelper::combine($this->items);
         // set the companies names
         $this->names = $this->results->companiesNames;
         $this->item = new stdClass();
         $this->item->currency_name = $this->results->currencyDetails->currency_name;
     } else {
         // int all as false
         $this->results = false;
         // set the companies names
         $this->names = JText::_('COM_COSTBENEFITPROJECTION_NONE_LOADED');
         $this->item = new stdClass();
         $this->item->currency_name = '';
     }
     // Set the toolbar
     $this->addToolBar();
     // set the document
     $this->_prepareDocument();
     parent::display($tpl);
 }
开发者ID:namibia,项目名称:CBP-Joomla-3-Component,代码行数:37,代码来源:view.html.php


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