本文整理汇总了PHP中eZContentObjectAttribute::metaDataArray方法的典型用法代码示例。如果您正苦于以下问题:PHP eZContentObjectAttribute::metaDataArray方法的具体用法?PHP eZContentObjectAttribute::metaDataArray怎么用?PHP eZContentObjectAttribute::metaDataArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZContentObjectAttribute
的用法示例。
在下文中一共展示了eZContentObjectAttribute::metaDataArray方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: metaData
function metaData($contentObjectAttribute)
{
$object = $this->objectAttributeContent($contentObjectAttribute);
if ($object) {
if (eZContentObject::recursionProtect($object->attribute('id'))) {
// Does the related object exist in the same language as the current content attribute ?
if (in_array($contentObjectAttribute->attribute('language_code'), $object->attribute('current')->translationList(false, false))) {
$attributes = $object->attribute('current')->contentObjectAttributes($contentObjectAttribute->attribute('language_code'));
} else {
$attributes = $object->contentObjectAttributes();
}
return eZContentObjectAttribute::metaDataArray($attributes);
} else {
return array();
}
}
return false;
}
示例2: metaData
function metaData($contentObjectAttribute)
{
$metaDataArray = $attributes = array();
$content = $contentObjectAttribute->content();
$language = $contentObjectAttribute->attribute('language_code');
foreach ($content['relation_list'] as $relationItem) {
$subObjectID = $relationItem['contentobject_id'];
if (!$subObjectID) {
continue;
}
if (isset($content['temp'])) {
$attributes = $content['temp'][$subObjectID]['attributes'];
} else {
$subObjectVersion = $relationItem['contentobject_version'];
$object = eZContentObject::fetch($subObjectID);
if (eZContentObject::recursionProtect($subObjectID)) {
if (!$object) {
continue;
}
$attributes = $object->contentObjectAttributes(true, $subObjectVersion, $language);
}
}
$attributeMetaDataArray = eZContentObjectAttribute::metaDataArray($attributes);
$metaDataArray = array_merge($metaDataArray, $attributeMetaDataArray);
}
return $metaDataArray;
}
示例3: metaData
function metaData($contentObjectAttribute)
{
$metaDataArray = $attributes = array();
$content = $contentObjectAttribute->content();
$language = $contentObjectAttribute->attribute('language_code');
foreach ($content['relation_list'] as $relationItem) {
$subObjectID = $relationItem['contentobject_id'];
if (!$subObjectID) {
continue;
}
if (isset($content['temp'])) {
$attributes = $content['temp'][$subObjectID]['attributes'];
} else {
$subObjectVersionNum = $relationItem['contentobject_version'];
$subObject = eZContentObject::fetch($subObjectID);
// Using last version of object (version inside xml data is the original version)
$subCurrentVersionObject = $subObject->currentVersion();
if ($subCurrentVersionObject instanceof eZContentObjectVersion) {
$subObjectVersionNum = $subCurrentVersionObject->attribute('version');
}
if (eZContentObject::recursionProtect($subObjectID)) {
if (!$subObject) {
continue;
}
$attributes = $subObject->contentObjectAttributes(true, $subObjectVersionNum, $language);
}
}
$attributeMetaDataArray = eZContentObjectAttribute::metaDataArray($attributes);
$metaDataArray = array_merge($metaDataArray, $attributeMetaDataArray);
}
return $metaDataArray;
}