当前位置: 首页>>代码示例>>PHP>>正文


PHP eZContentObject::recursionProtect方法代码示例

本文整理汇总了PHP中eZContentObject::recursionProtect方法的典型用法代码示例。如果您正苦于以下问题:PHP eZContentObject::recursionProtect方法的具体用法?PHP eZContentObject::recursionProtect怎么用?PHP eZContentObject::recursionProtect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在eZContentObject的用法示例。


在下文中一共展示了eZContentObject::recursionProtect方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getBaseList

 /**
  * Get ezfSolrDocumentFieldBase instances for all attributes of specified eZContentObjectVersion
  *
  * @param eZContentObjectVersion Instance of eZContentObjectVersion to fetch attributes from.
  *
  * @return array List of ezfSolrDocumentFieldBase instances.
  */
 function getBaseList( eZContentObjectVersion $objectVersion )
 {
     $returnList = array();
     // Get ezfSolrDocumentFieldBase instance for all attributes in related object
     if ( eZContentObject::recursionProtect( $this->ContentObjectAttribute->attribute( 'contentobject_id' ) ) )
     {
         foreach ( $objectVersion->contentObjectAttributes( $this->ContentObjectAttribute->attribute( 'language_code' ) ) as $attribute )
         {
             if ( $attribute->attribute( 'contentclass_attribute' )->attribute( 'is_searchable' ) )
             {
                 $returnList[] = ezfSolrDocumentFieldBase::getInstance( $attribute );
             }
         }
     }
     return $returnList;
 }
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:23,代码来源:ezfsolrdocumentfieldobjectrelation.php

示例2: 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;
 }
开发者ID:mugoweb,项目名称:ezpublish-legacy,代码行数:18,代码来源:ezobjectrelationtype.php

示例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 {
             $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;
 }
开发者ID:nfrp,项目名称:ezpublish,代码行数:27,代码来源:ezobjectrelationlisttype.php

示例4: 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;
 }
开发者ID:patrickallaert,项目名称:ezpublish-legacy-php7,代码行数:32,代码来源:ezobjectrelationlisttype.php


注:本文中的eZContentObject::recursionProtect方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。