本文整理汇总了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;
}