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


PHP ilTemplate::parse方法代码示例

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


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

示例1: showContainerContent

 public function showContainerContent()
 {
     global $ilUser, $rbacreview, $ilToolbar;
     if ($rbacreview->isAssigned($ilUser->getId(), SYSTEM_ROLE_ID)) {
         $ilToolbar->addButton($this->lng->txt('edit_page'), $this->ctrl->getLinkTargetByClass(array('ilpageobjectgui'), 'edit'));
     }
     include_once './Services/Payment/classes/class.ilPaymentObject.php';
     $is_buyable = ilPaymentObject::_isBuyable($this->cur_ref_id);
     if ($is_buyable) {
         $pobjects = ilPaymentObject::_getObjectData(ilPaymentObject::_lookupPobjectId($this->cur_ref_id));
         $obj_id = ilObject::_lookupObjId($this->cur_ref_id);
         $title = ilObject::_lookupTitle($obj_id);
         $description = ilObject::_lookupDescription($obj_id);
         $type = ilObject::_lookupType($obj_id);
         $presentation_results[$pobjects['pt_topic_fk']][$type][] = array('ref_id' => $pobjects['ref_id'], 'title' => $title, 'description' => $description, 'type' => $type, 'obj_id' => $obj_id, 'topic_id' => $pobjects['pt_topic_fk'], 'child' => $pobjects['child']);
     } else {
         $pobjects = ilPaymentObject::_getContainerObjects($this->cur_ref_id);
         if (count($pobjects) >= 1) {
             foreach ($pobjects as $result) {
                 $obj_id = $result['obj_id'];
                 $title = $result['title'];
                 $description = $result['description'];
                 $type = $result['type'];
                 $presentation_results[$result['pt_topic_fk']][$type][] = array('ref_id' => $result['ref_id'], 'title' => $title, 'description' => $description, 'type' => $type, 'obj_id' => $obj_id, 'topic_id' => $result['pt_topic_fk'], 'child' => $result['child']);
             }
         }
     }
     $shop_content_tpl = new ilTemplate('tpl.shop_content.html', true, true, 'Services/Payment');
     $shop_content_tpl->setVariable('PAGE_CONTENT', $this->getPageHTML());
     include_once 'Services/Payment/classes/class.ilShopResultPresentationGUI.php';
     $search_result_presentation = new ilShopResultPresentationGUI($presentation_results);
     $search_result_presentation->setSortField(strtolower(trim($this->getSortField())));
     $search_result_presentation->setSortDirection(trim($this->getSortDirection()));
     $html = $search_result_presentation->showSpecials();
     $shop_content_tpl->setVariable('RESULTS', $html);
     $show_general_filter = $this->oGeneralSettings->get('show_general_filter');
     $show_topics_filter = $this->oGeneralSettings->get('show_topics_filter');
     $show_shop_explorer = $this->oGeneralSettings->get('show_shop_explorer');
     if ($show_general_filter) {
         $g_filter_html = $this->showGeneralFilter(count($search_result_presentation));
         $shop_content_tpl->setVariable('FORM', $g_filter_html);
     }
     if ($show_topics_filter) {
         $this->showTopicsFilter(count($search_result_presentation));
     }
     if ($show_shop_explorer) {
         $this->showShopExplorer();
     }
     global $tpl;
     $tpl->setContent($shop_content_tpl->parse());
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:51,代码来源:class.ilShopGUI.php


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