本文整理汇总了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)