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


PHP eZContentObject::mainNodeID方法代码示例

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


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

示例1: __get

 /**
  * Getter
  * Returns given attribute for current content object if it exists (ie. main_node_id).
  * Will throw an exception otherwise.
  * All "classic" attributes can be used (See {@link eZContentObject::definition()}).
  * @param $name
  * @throws ezcBasePropertyNotFoundException
  */
 public function __get($name)
 {
     $ret = null;
     switch ($name) {
         case 'locations':
             if (!$this->currentLocations instanceof SQLILocationSet) {
                 $this->refreshLocations();
             }
             $ret = $this->currentLocations;
             break;
         case 'defaultLocation':
             if (!$this->currentLocations instanceof SQLILocationSet) {
                 $this->refreshLocations();
             }
             $ret = $this->currentLocations[$this->contentObject->mainNodeID()];
             break;
         default:
             if ($this->contentObject->hasAttribute($name)) {
                 $ret = $this->contentObject->attribute($name);
             } else {
                 throw new ezcBasePropertyNotFoundException($name);
             }
     }
     return $ret;
 }
开发者ID:nicolasaguenot,项目名称:sqliimport,代码行数:33,代码来源:sqlicontent.php

示例2: updateContentObject

 private function updateContentObject(eZContentObject $eZContentObject)
 {
     $mainNodeID = $eZContentObject->mainNodeID();
     $parentNodeID = eZContentObjectTreeNode::getParentNodeId($mainNodeID);
     $classIdentifier = $eZContentObject->ClassIdentifier;
     $remoteID = $eZContentObject->RemoteID;
     if (!eZContentClass::fetchByIdentifier($classIdentifier)) {
         throw new Exception("La classe" . $classIdentifier . "non esiste in questa installazione");
     }
     $params = array();
     $params['class_identifier'] = $classIdentifier;
     $params['remote_id'] = $remoteID;
     $params['parent_node_id'] = $parentNodeID;
     $params['attributes'] = $this->getAttributesStringArray($eZContentObject);
     $result = eZContentFunctions::updateAndPublishObject($eZContentObject, $params);
     return $result;
 }
开发者ID:informaticatrentina,项目名称:itobjectsync,代码行数:17,代码来源:ocOpendataImportController.php


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