本文整理匯總了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());
}