本文整理汇总了PHP中eZContentObject::remoteID方法的典型用法代码示例。如果您正苦于以下问题:PHP eZContentObject::remoteID方法的具体用法?PHP eZContentObject::remoteID怎么用?PHP eZContentObject::remoteID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZContentObject
的用法示例。
在下文中一共展示了eZContentObject::remoteID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: modify
//.........这里部分代码省略.........
$dataMap = $contentMainNode->dataMap();
ClusterTool::setCurrentCluster( $cluster );
if( $applicationIdentifier == MerckManualShowcase::mainApplicationIdentifier() )
{
$urlContent = preg_replace(
'#^([^/]+/){2}#',
'',
MerckManualFunctionCollection::getMerckManualNodeUrl(
$applicationIdentifier,
$contentMainNode,
$primaryLanguage
)
);
}
else
$urlContent = preg_replace( '#^([^/]+/){2}#', '', $contentMainNode->urlAlias() );
$this->addValueToDoc( $docList, 'attr_' . $cluster . '_url_s', $urlContent);
$hasImage = array();
for ( $mediaCase = 0; $mediaCase<=2; $mediaCase++ )
{
$hasImage[$mediaCase] = NodeOperatorHelper::hasImageArticle($contentMainNode, $mediaCase);
}
self::addValueToDoc( $docList, 'attr_has_image_' . $cluster . '_bst', base64_encode(json_encode($hasImage)) );
$db = MMDB::instance();
// index rating
$row = $db->arrayQuery(sprintf("SELECT * FROM mm_rating_remote WHERE cluster_identifier = '%s' AND remote_id = '%s'", $cluster, $contentObject->remoteID()));
if(count($row) && $row[0]["counter"] > 5 )
{
self::addValueToDoc( $docList, 'attr_content_rating_'.$cluster.'_f', $row[0]["total"]/$row[0]["counter"] );
//update to_reindex
$db->query(sprintf("UPDATE mm_rating_remote SET to_reindex=0 WHERE cluster_identifier = '%s' AND remote_id = '%s'", $cluster, $contentObject->remoteID()));
}
// index views
$row = $db->arrayQuery(sprintf("SELECT * FROM mm_readcount_remote WHERE cluster_identifier = '%s' AND remote_id = '%s'", $cluster, $contentObject->remoteID()));
if(count($row) && $row[0]["count"] > 0 )
{
self::addValueToDoc( $docList, 'attr_view_counter_'.$cluster.'_i', $row[0]["count"] );
//update to_reindex
$db->query(sprintf("UPDATE mm_readcount_remote SET to_reindex=0 WHERE cluster_identifier = '%s' AND remote_id = '%s'", $cluster, $contentObject->remoteID()));
}
if( $dataMap && $dataMap['media_content']->hasContent() )
{
$mediaContent = $dataMap['media_content']->content();
$mediaRelationList = $mediaContent['relation_list'];
$entries = array();
$firstLink = true;
$totalQuizzes = 0;
foreach ( $mediaRelationList as $mediaRelation )
{
$mediaObjectId = $mediaRelation['contentobject_id'];
$mediaClass = $mediaRelation['contentclass_identifier'];
/*******************************************************************************
* TODO : Adapt after PF Refactor
*******************************************************************************/