本文整理匯總了PHP中JModelForm::addComponentFieldPath方法的典型用法代碼示例。如果您正苦於以下問題:PHP JModelForm::addComponentFieldPath方法的具體用法?PHP JModelForm::addComponentFieldPath怎麽用?PHP JModelForm::addComponentFieldPath使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類JModelForm
的用法示例。
在下文中一共展示了JModelForm::addComponentFieldPath方法的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');
}
}