本文整理汇总了PHP中ClusterTool::isTwoLangCluster方法的典型用法代码示例。如果您正苦于以下问题:PHP ClusterTool::isTwoLangCluster方法的具体用法?PHP ClusterTool::isTwoLangCluster怎么用?PHP ClusterTool::isTwoLangCluster使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ClusterTool
的用法示例。
在下文中一共展示了ClusterTool::isTwoLangCluster方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSocialInfos
/**
* @return array
*/
public function getSocialInfos()
{
if( !($this->node instanceof eZContentObjectTreeNode)
|| $this->node->attribute('class_identifier') != 'article' )
return array();
/* @type eZContentObjectAttribute[] $dataMap */
$dataMap = $this->node->dataMap();
$headline = $dataMap["headline"]->content();
$urlParams = array();
$description = "";
$imageUrl = "";
$urlGet = "";
if ( ClusterTool::isTwoLangCluster() )
{
$urlParams['ll'] = SystemLocale::fetchByClusterAndSystem( ClusterTool::clusterIdentifier(), 'exact_target' );
}
if($dataMap["promo_description"]->hasContent())
{
$description = strip_tags($dataMap["promo_description"]->content());
}
if ( count($urlParams) > 0 )
{
$urlGet = '?' . http_build_query($urlParams);
}
if ( NodeOperatorHelper::hasImageArticle($this->node, ImageArticleTool::SLIDE_APPLICATION_CASE ) )
{
$imageUrl = SolrSafeOperatorHelper::getImageArticleUrl(
ImageArticleTool::SLIDE_APPLICATION_CASE,
$this->node->attribute('contentobject_id'),
$this->node->currentLanguage(),
'dt_full'
);
$imageUrl .= $urlGet;
}
return array(
"title" => $headline,
"description" => $description,
"url" => $this->applicationName()."/".$this->node->remoteID().$urlGet,
"imageUrl" => $imageUrl
);
}