本文整理匯總了PHP中JLayoutFile::setIncludePaths方法的典型用法代碼示例。如果您正苦於以下問題:PHP JLayoutFile::setIncludePaths方法的具體用法?PHP JLayoutFile::setIncludePaths怎麽用?PHP JLayoutFile::setIncludePaths使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類JLayoutFile
的用法示例。
在下文中一共展示了JLayoutFile::setIncludePaths方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getRenderer
/**
* Get the renderer
*
* @param string $layout Layout to load.
* @param array $options Optional array with layout options
*
* @return JLayoutFile Renderer instance
*/
protected function getRenderer($layout, $options = array())
{
$template = JFactory::getApplication()->getTemplate();
$renderer = new JLayoutFile($layout, null, $options);
$renderer->setIncludePaths(array(JPATH_THEMES . "/" . $template . '/html/layouts/plugins/' . $this->_type . '/' . $this->_name, JPATH_SITE . '/layouts/plugins/' . $this->_type . '/' . $this->_name));
return $renderer;
}
示例2: getRenderer
/**
* Get the renderer
*
* @param string $layoutId Id to load
*
* @return JLayout
*
* @since 3.5
*/
protected function getRenderer($layoutId = 'default')
{
$renderer = new JLayoutFile($layoutId);
$renderer->setDebug($this->isDebugEnabled());
$layoutPaths = $this->getLayoutPaths();
if ($layoutPaths) {
$renderer->setIncludePaths($layoutPaths);
}
return $renderer;
}
示例3: getRenderer
/**
* Get the plugin renderer
*
* @param string $layoutId Layout identifier
*
* @return JLayout
*
* @since 3.5
*/
protected function getRenderer($layoutId = 'default')
{
$renderer = new JLayoutFile($layoutId);
$renderer->setIncludePaths($this->getLayoutsPaths());
return $renderer;
}