當前位置: 首頁>>代碼示例>>PHP>>正文


PHP eZSiteAccess::siteAccessList方法代碼示例

本文整理匯總了PHP中eZSiteAccess::siteAccessList方法的典型用法代碼示例。如果您正苦於以下問題:PHP eZSiteAccess::siteAccessList方法的具體用法?PHP eZSiteAccess::siteAccessList怎麽用?PHP eZSiteAccess::siteAccessList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在eZSiteAccess的用法示例。


在下文中一共展示了eZSiteAccess::siteAccessList方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getMappingSiteAccess

    /**
     * @param string $siteAccess
     * @return array
     */
    public static function getMappingSiteAccess($siteAccess = null)
    {
        if(!$siteAccess)
            $siteAccessList = eZSiteAccess::siteAccessList();
        else
            $siteAccessList = array($siteAccess);

        $ClusterSiteAccess = array();
        foreach($siteAccessList as $siteAccess)
        {
            $activeExtensions = eZINI::getSiteAccessIni($siteAccess["name"], "site.ini")->variable("ExtensionSettings", "ActiveAccessExtensions");
            foreach($activeExtensions as $extension)
            {
                if(strpos($extension, 'cluster', 0) === 0)
                {
                    $cluster = $extension;
                    break;
                }
            }

            if($cluster)
                $ClusterSiteAccess[$cluster] = $siteAccess["name"];
        }

        return $ClusterSiteAccess;
    }
開發者ID:sushilbshinde,項目名稱:ezpublish-study,代碼行數:30,代碼來源:clusterTool.php

示例2: exists

 /**
  * Checks if $siteAccessName matches a configured siteaccess
  * @param $siteAccessName
  * @return bool
  */
 public static function exists($siteAccessName)
 {
     foreach (eZSiteAccess::siteAccessList() as $siteaccessListItem) {
         if ($siteaccessListItem['name'] == $siteAccessName) {
             return true;
         }
     }
     return false;
 }
開發者ID:mugoweb,項目名稱:ezpublish-legacy,代碼行數:14,代碼來源:ezsiteaccess.php

示例3: class_exists

{
    $cli->error('Time has to be an int');
    $script->shutdown(1);
}

/* @var $db eZDB */
$db = class_exists('eZXDB')
    ? eZXDB::instance()
    : eZDB::instance();

$locales = fetchLocales($db, $time);

if ( !empty($locales) )
{
    $currentSiteAccess = eZSiteAccess::current();
    $siteAccessList = eZSiteAccess::siteAccessList();
    $locale2siteAccess = array();

    foreach ( $siteAccessList as $siteAccess )
    {
        eZSiteAccess::load($siteAccess);
        $ini = eZINI::instance();
        $locale = $ini->variable( 'RegionalSettings', 'Locale' );
        if ( !isset($locale2siteAccess[$locale]) )
        {
            $locale2siteAccess[$locale] = array();
        }
        $locale2siteAccess[$locale][] = $siteAccess;
    }

    foreach ($locales as $locale)
開發者ID:sushilbshinde,項目名稱:ezpublish-study,代碼行數:31,代碼來源:generate_translation_cache.php


注:本文中的eZSiteAccess::siteAccessList方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。