本文整理匯總了PHP中misc::setTemplate方法的典型用法代碼示例。如果您正苦於以下問題:PHP misc::setTemplate方法的具體用法?PHP misc::setTemplate怎麽用?PHP misc::setTemplate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類misc
的用法示例。
在下文中一共展示了misc::setTemplate方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: setViewSubpart
/**
* Sets the template of the view.
*
* @param int The current step
* @return void
*/
protected function setViewSubpart($step)
{
$this->finished = FALSE;
if (intval($this->utilityFuncs->getSingle($this->settings, 'skipView')) === 1) {
$this->finished = TRUE;
} elseif (strstr($this->templateFile, '###TEMPLATE_FORM' . $step . $this->settings['templateSuffix'] . '###')) {
// search for ###TEMPLATE_FORM[step][suffix]###
$this->utilityFuncs->debugMessage('using_subpart', array('###TEMPLATE_FORM' . $step . $this->settings['templateSuffix'] . '###'));
$this->view->setTemplate($this->templateFile, 'FORM' . $step . $this->settings['templateSuffix']);
} elseif (!isset($this->settings['templateSuffix']) && strstr($this->templateFile, '###TEMPLATE_FORM' . $step . '###')) {
//search for ###TEMPLATE_FORM[step]###
$this->utilityFuncs->debugMessage('using_subpart', array('###TEMPLATE_FORM' . $step . '###'));
$this->view->setTemplate($this->templateFile, 'FORM' . $step);
} elseif (intval($step) === intval($this->globals->getSession()->get('lastStep')) + 1) {
$this->finished = TRUE;
}
}
示例2: setViewSubpart
/**
* Sets the template of the view.
*
* @return void
* @author Reinhard Führicht <rf@typoheads.at>
*/
protected function setViewSubpart($step)
{
$this->finished = FALSE;
if (intval($this->settings['skipView']) === 1) {
$this->finished = TRUE;
} elseif (strstr($this->templateFile, '###TEMPLATE_FORM' . $step . $this->settings['templateSuffix'] . '###')) {
// search for ###TEMPLATE_FORM[step][suffix]###
Tx_Formhandler_StaticFuncs::debugMessage('using_subpart', array('###TEMPLATE_FORM' . $step . $this->settings['templateSuffix'] . '###'));
$this->view->setTemplate($this->templateFile, 'FORM' . $step . $this->settings['templateSuffix']);
} elseif (!isset($this->settings['templateSuffix']) && strstr($this->templateFile, '###TEMPLATE_FORM' . $step . '###')) {
//search for ###TEMPLATE_FORM[step]###
Tx_Formhandler_StaticFuncs::debugMessage('using_subpart', array('###TEMPLATE_FORM' . $step . '###'));
$this->view->setTemplate($this->templateFile, 'FORM' . $step);
} elseif (intval($step) === intval(Tx_Formhandler_Globals::$session->get('lastStep')) + 1) {
$this->finished = TRUE;
}
}