本文整理匯總了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;
}
示例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;
}
示例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)