本文整理匯總了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
*******************************************************************************/