本文整理汇总了PHP中ApacheSolrForTypo3\Solr\Util::getConfigurationFromPageId方法的典型用法代码示例。如果您正苦于以下问题:PHP Util::getConfigurationFromPageId方法的具体用法?PHP Util::getConfigurationFromPageId怎么用?PHP Util::getConfigurationFromPageId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ApacheSolrForTypo3\Solr\Util
的用法示例。
在下文中一共展示了Util::getConfigurationFromPageId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getDefaultLanguage
/**
* Gets the site's default language as configured in
* config.sys_language_uid. If sys_language_uid is not set, 0 is assumed to
* be the default.
*
* @return integer The site's default language.
*/
public function getDefaultLanguage()
{
$siteDefaultLanguage = 0;
$configuration = Util::getConfigurationFromPageId($this->rootPage['uid'], 'config', false, false);
if (isset($configuration['sys_language_uid'])) {
$siteDefaultLanguage = $configuration['sys_language_uid'];
}
// default language is set through default L GET parameter -> overruling config.sys_language_uid
if (isset($configuration['defaultGetVars.']['L'])) {
$siteDefaultLanguage = intval($configuration['defaultGetVars.']['L']);
}
return $siteDefaultLanguage;
}
示例2: getConfigurationFromPageIdReturnsEmptyConfigurationForPageIdZero
/**
* @test
*/
public function getConfigurationFromPageIdReturnsEmptyConfigurationForPageIdZero()
{
$configuration = Util::getConfigurationFromPageId(0, 'plugin.tx_solr', false, 0, false);
$this->assertInstanceOf('ApacheSolrForTypo3\\Solr\\System\\Configuration\\TypoScriptConfiguration', $configuration);
}
示例3: getDefaultLanguage
/**
* Gets the site's default language as configured in
* config.sys_language_uid. If sys_language_uid is not set, 0 is assumed to
* be the default.
*
* @return integer The site's default language.
*/
public function getDefaultLanguage()
{
$siteDefaultLanguage = 0;
$configuration = Util::getConfigurationFromPageId($this->rootPage['uid'], 'config', false, false);
$siteDefaultLanguage = $configuration->getValueByPathOrDefaultValue('sys_language_uid', $siteDefaultLanguage);
// default language is set through default L GET parameter -> overruling config.sys_language_uid
$siteDefaultLanguage = $configuration->getValueByPathOrDefaultValue('defaultGetVars.L', $siteDefaultLanguage);
return $siteDefaultLanguage;
}