本文整理匯總了PHP中eZTemplateDesignResource::designExtensions方法的典型用法代碼示例。如果您正苦於以下問題:PHP eZTemplateDesignResource::designExtensions方法的具體用法?PHP eZTemplateDesignResource::designExtensions怎麽用?PHP eZTemplateDesignResource::designExtensions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類eZTemplateDesignResource
的用法示例。
在下文中一共展示了eZTemplateDesignResource::designExtensions方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: findDesignBase
/**
* Find the location on design bases on the disk
*
* @param $ini an eZINI object
* @param $siteAccess Wether to use siteaccesses or not
* @return array The list of design bases
*/
private static function findDesignBase(eZINI $ini, $siteAccess = false)
{
if ($siteAccess) {
$ini = eZSiteAccess::getIni($siteAccess, 'site.ini');
$standardDesign = $ini->variable('DesignSettings', 'StandardDesign');
$siteDesign = $ini->variable('DesignSettings', 'SiteDesign');
} else {
$ini = eZINI::instance();
$standardDesign = eZTemplateDesignResource::designSetting('standard');
$siteDesign = eZTemplateDesignResource::designSetting('site');
}
$siteDesignList = $ini->variable('DesignSettings', 'AdditionalSiteDesignList');
array_unshift($siteDesignList, $siteDesign);
$siteDesignList[] = $standardDesign;
$siteDesignList = array_unique($siteDesignList);
$designBaseList = array();
$extensionDirectory = eZExtension::baseDirectory();
$designStartPath = eZTemplateDesignResource::designStartPath();
$extensions = eZTemplateDesignResource::designExtensions();
foreach ($siteDesignList as $design) {
foreach ($extensions as $extension) {
$path = "{$extensionDirectory}/{$extension}/{$designStartPath}/{$design}";
if (file_exists($path)) {
$designBaseList[] = $path;
}
}
$path = "{$designStartPath}/{$design}";
if (file_exists($path)) {
$designBaseList[] = $path;
}
}
return $designBaseList;
}