本文整理汇总了PHP中JView::loadHelper方法的典型用法代码示例。如果您正苦于以下问题:PHP JView::loadHelper方法的具体用法?PHP JView::loadHelper怎么用?PHP JView::loadHelper使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JView
的用法示例。
在下文中一共展示了JView::loadHelper方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
function display($tpl = null)
{
$mainframe =& JFactory::getApplication();
$dispatcher =& JDispatcher::getInstance();
/* Load the event details */
$course = $this->get('Details');
$venue = $this->get('Venue');
$pdf = new TCPDF("P", "mm", "A4", true);
$pdf->SetCreator($mainframe->getCfg('sitename'));
$pdf->SetAuthor($mainframe->getCfg('sitename'));
$pdf->SetTitle($course->title);
$pdf->SetSubject($course->title);
$pdf->setHeaderFont(array('freesans', '', 8));
$pdf->setFooterFont(array('freesans', '', 8));
$pdf->setFont('freesans');
// disable header and footer
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(true);
//set the display mode
$pdf->SetDisplayMode('default');
//initialize document
$pdf->AliasNbPages();
// add a page
$pdf->AddPage();
$pdf->SetFontSize(10);
/* This loads the tags replacer */
JView::loadHelper('tags');
$tags = new redEVENT_tags();
$tags->setXref(JRequest::getInt('xref'));
$message = $tags->ReplaceTags($course->submission_type_email_pdf);
// convert urls
$htmlmsg = REOutput::ImgRelAbs($message);
$pdf->WriteHTML($message, true);
// add the form data if requested
if ($course->pdf_form_data) {
JRequest::setVar('pdfform', $pdf);
JPluginHelper::importPlugin('content');
$form = new stdClass();
$form->text = '{redform}' . $course->redform_id . ',1{/redform}';
$form->eventid = $course->did;
$form->task = 'userregister';
$results = $dispatcher->trigger('onPrepareEvent', array(&$form, array(), 0));
$pdf->WriteHTML($form->text, true);
}
// output the file
$pdf->Output($course->title . ".pdf", "I");
exit;
}