当前位置: 首页>>代码示例>>PHP>>正文


PHP eZSiteAccess::findPathToSiteAccess方法代码示例

本文整理汇总了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();
}
开发者ID:legende91,项目名称:ez,代码行数:31,代码来源:toolbar.php

示例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}");
 }
开发者ID:runelangseid,项目名称:ezpublish,代码行数:13,代码来源:ezini.php

示例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')) {
开发者ID:CG77,项目名称:ezpublish-legacy,代码行数:31,代码来源:menuconfig.php


注:本文中的eZSiteAccess::findPathToSiteAccess方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。