本文整理汇总了PHP中JView::addViewTemplatePath方法的典型用法代码示例。如果您正苦于以下问题:PHP JView::addViewTemplatePath方法的具体用法?PHP JView::addViewTemplatePath怎么用?PHP JView::addViewTemplatePath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JView
的用法示例。
在下文中一共展示了JView::addViewTemplatePath方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onAfterRoute
/**
* onAfterRoute function.
*
* @access public
* @return void
*/
public function onAfterRoute()
{
$option = $this->getOption();
if ($option === false || !isset(self::$componentList[$option])) {
return;
}
MVCOverrideHelperCodepool::initialize();
// Add override paths for the current component files
foreach (MVCOverrideHelperCodepool::addCodePath() as $codePool) {
if (version_compare(JVERSION, '3.0', '>=')) {
JViewLegacy::addViewHelperPath($codePool . '/' . $option);
JViewLegacy::addViewTemplatePath($codePool . '/' . $option);
} else {
JView::addViewHelperPath($codePool . '/' . $option);
JView::addViewTemplatePath($codePool . '/' . $option);
}
JModuleHelper::addIncludePath($codePool . '/modules');
JTable::addIncludePath($codePool . '/' . $option . '/tables');
JModelForm::addComponentFormPath($codePool . '/' . $option . '/models/forms');
JModelForm::addComponentFieldPath($codePool . '/' . $option . '/models/fields');
}
}
示例2: registerPaths
/**
* Register override paths based on codepools
*
* @param string $option
*/
private static function registerPaths($option)
{
foreach (JoomlaOverrideHelperCodepool::addCodePath() as $codePool) {
if (JVERSION > 2.5) {
JModelLegacy::addIncludePath($codePool . '/' . $option . '/models');
JViewLegacy::addViewHelperPath($codePool . '/' . $option);
JViewLegacy::addViewTemplatePath($codePool . '/' . $option);
} else {
JModel::addIncludePath($codePool . '/' . $option . '/models');
JView::addViewHelperPath($codePool . '/' . $option);
JView::addViewTemplatePath($codePool . '/' . $option);
}
JTable::addIncludePath($codePool . '/' . $option . '/tables');
JModelForm::addComponentFormPath($codePool . '/' . $option . '/models/forms');
JModelForm::addComponentFieldPath($codePool . '/' . $option . '/models/fields');
}
}