本文整理汇总了PHP中eZSiteAccess::findPathToSiteAccess方法的典型用法代码示例。如果您正苦于以下问题:PHP eZSiteAccess::findPathToSiteAccess方法的具体用法?PHP eZSiteAccess::findPathToSiteAccess怎么用?PHP eZSiteAccess::findPathToSiteAccess使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZSiteAccess
的用法示例。
在下文中一共展示了eZSiteAccess::findPathToSiteAccess方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: removeRelatedCache
function removeRelatedCache($siteAccess)
{
// Delete compiled template
$ini = eZINI::instance();
$iniPath = eZSiteAccess::findPathToSiteAccess($siteAccess);
$siteINI = eZINI::instance('site.ini.append', $iniPath);
if ($siteINI->hasVariable('FileSettings', 'CacheDir')) {
$cacheDir = $siteINI->variable('FileSettings', 'CacheDir');
if ($cacheDir[0] == "/") {
$cacheDir = eZDir::path(array($cacheDir));
} else {
if ($siteINI->hasVariable('FileSettings', 'VarDir')) {
$varDir = $siteINI->variable('FileSettings', 'VarDir');
$cacheDir = eZDir::path(array($varDir, $cacheDir));
}
}
} else {
if ($siteINI->hasVariable('FileSettings', 'VarDir')) {
$varDir = $siteINI->variable('FileSettings', 'VarDir');
$cacheDir = $ini->variable('FileSettings', 'CacheDir');
$cacheDir = eZDir::path(array($varDir, $cacheDir));
} else {
$cacheDir = eZSys::cacheDirectory();
}
}
$compiledTemplateDir = $cacheDir . "/template/compiled";
eZDir::unlinkWildcard($compiledTemplateDir . "/", "*pagelayout*.*");
eZCache::clearByTag('template-block');
// Expire content view cache
eZContentCacheManager::clearAllContentCache();
}
示例2: getSiteAccessIni
/**
* Get ini file for a specific siteaccess (not incl extesnions or overrides)
* use {@link eZSiteAccess::getIni()} instead if you want to have full ini env.
*
* @param string $siteAccess
* @param string $iniFile
* @return eZINI
*/
static function getSiteAccessIni($siteAccess, $iniFile)
{
$saPath = eZSiteAccess::findPathToSiteAccess($siteAccess);
return self::fetchFromFile("{$saPath}/{$iniFile}");
}
示例3:
}
$siteAccessList = $ini->variable('SiteAccessSettings', 'RelatedSiteAccessList');
$siteAccess = false;
// Fetch siteaccess settings for the selected override
// Default to first defined siteacces if none are selected
if ($http->hasSessionVariable('eZTemplateAdminCurrentSiteAccess')) {
$siteAccess = $http->sessionVariable('eZTemplateAdminCurrentSiteAccess');
}
if (!in_array($siteAccess, $siteAccessList)) {
$siteAccess = $siteAccessList[0];
}
if ($http->hasPostVariable('SelectCurrentSiteAccessButton')) {
$http->setSessionVariable('eZTemplateAdminCurrentSiteAccess', $siteAccess);
}
// Get path to specified site access.
$pathToSiteAccess = eZSiteAccess::findPathToSiteAccess($siteAccess);
$menuINI = eZINI::instance("menu.ini", "", null, null, true);
$menuINI->prependOverrideDir($pathToSiteAccess, true, 'siteaccess');
$menuINI->loadCache();
/*$iniPath = "settings/siteaccess/$siteAccess";
$menuINI = eZINI::instance( 'menu.ini.append.php', $iniPath, null, false, null, true );*/
if ($module->isCurrentAction('Store')) {
$menuType = $http->postVariable('MenuType');
$menuINI->setVariable('SelectedMenu', 'CurrentMenu', $menuType);
$menuINI->setVariable('SelectedMenu', 'TopMenu', $menuINI->variable($menuType, "TopMenu"));
$menuINI->setVariable('SelectedMenu', 'LeftMenu', $menuINI->variable($menuType, "LeftMenu"));
$menuINI->save("menu.ini.append.php", false, false, false, $pathToSiteAccess, true);
// Delete compiled template
$iniPath = $pathToSiteAccess;
$siteINI = eZINI::instance('site.ini.append', $iniPath);
if ($siteINI->hasVariable('FileSettings', 'CacheDir')) {