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


PHP JViewLegacy::loadTemplate方法代码示例

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


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

示例1: display

 function display($tpl = null)
 {
     global $mainframe;
     $app = JFactory::getApplication();
     $params = $app->getParams();
     $this->assignRef('params', $params);
     $user = JFactory::getUser();
     $username = $user->username;
     $this->child = JFactory::getUser($username);
     $layout = $params->get('layout');
     $this->tasks = JoomdleHelperContent::call_method("get_children_grade_user_report", $username);
     $tpl = "catspdf";
     $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx'));
     $this->_prepareDocument();
     $htmlcontent = parent::loadTemplate($tpl);
     require_once JPATH_SITE . '/libraries/tcpdf/tcpdf.php';
     $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
     $header = JText::_('COM_JOOMDLE_GRADES');
     $pdf->SetHeaderData('', 0, $header);
     //set margins
     $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
     $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
     $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
     $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
     $pdf->setFontSubsetting(false);
     $pdf->SetFont('times', '', 8);
     // add a page
     $pdf->AddPage("L");
     // output the HTML content
     $pdf->writeHTML($htmlcontent, true, 0, true, 0);
     $pdf->Output("grades.pdf", 'D');
     exit;
 }
开发者ID:anawu2006,项目名称:PeerLearning,代码行数:33,代码来源:view.pdf.php

示例2: loadTemplate

 public function loadTemplate($tpl = null, $layout = null)
 {
     if ($layout == null) {
         return parent::loadTemplate($tpl);
     }
     $currentLayout = $this->getLayout();
     $this->setLayout($layout);
     // This is ugly
     $return = parent::loadTemplate($tpl);
     $this->setLayout($currentLayout);
     return $return;
 }
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:12,代码来源:BFCView.php

示例3: loadTemplate

 public function loadTemplate($tpl = null)
 {
     $name = $this->getName();
     $layout = $this->getLayout();
     $html = '';
     $function = isset($tpl) ? $layout . '_' . $tpl : $layout;
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeDisplayAdmin' . strtoupper($this->ext_prefix) . $name . $function, array(&$this, &$tpl, &$html));
     if ($tpl != 'empty') {
         $html .= parent::loadTemplate($tpl);
     }
     $dispatcher->trigger('onAfterDisplayAdmin' . strtoupper($this->ext_prefix) . $name . $function, array(&$this, &$tpl, &$html));
     return $html;
 }
开发者ID:JexyRu,项目名称:Ksenmart,代码行数:14,代码来源:viewksadmin.php

示例4: loadTemplate

 public function loadTemplate($tpl = null, $layout = null, array $vars = array())
 {
     $name = $this->getName();
     $current_layout = $this->getLayout();
     $html = '';
     $function = isset($tpl) ? $current_layout . '_' . $tpl : $current_layout;
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeDisplay' . strtoupper($this->ext_prefix) . $name . $function, array(&$this, &$tpl, &$html));
     if (!empty($layout)) {
         $this->setLayout($layout);
     }
     foreach ($vars as $name => &$var) {
         $this->assignRef($name, $var);
     }
     if ($tpl != 'empty') {
         $html .= parent::loadTemplate($tpl);
     }
     $this->setLayout($current_layout);
     $dispatcher->trigger('onAfterDisplay' . strtoupper($this->ext_prefix) . $name . $function, array(&$this, &$tpl, &$html));
     return $html;
 }
开发者ID:JexyRu,项目名称:Ksenmart,代码行数:21,代码来源:viewks.php

示例5: assignExtrasView

 protected function assignExtrasView()
 {
     // Create the View
     $view = new JViewLegacy(array('name' => 'extras', 'base_path' => JPATH_SITE . '/components/com_rsmembership'));
     // Create the Model
     $model = JModelLegacy::getInstance('Extras', 'RSMembershipModel');
     // Assign the Model to the View and set it as default.
     $view->setModel($model, true);
     $view->model =& $model;
     $view->item = $this->membership;
     $view->extras = $model->getItems();
     $view->show_subscribe_btn = false;
     $this->extrasview = $view->loadTemplate();
 }
开发者ID:JozefAB,项目名称:qk,代码行数:14,代码来源:view.html.php


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