示例#1
0
 /**
  * Initializes an object from eZContentObject
  * @param eZContentObject $object
  * @return SQLIContent
  */
 public static function fromContentObject(eZContentObject $object)
 {
     $content = new self();
     $content->fields = SQLIContentFieldsetHolder::fromContentObject($object);
     $content->contentObject = $object;
     $content->setActiveLanguage($content->fields->getActiveLanguage());
     return $content;
 }
示例#2
0
 /**
  * Returns current draft for content.
  * If no draft has been found, a new one will be created
  * @see SQLIContentFieldsetHolder::getCurrentDraft()
  * @return eZContentObjectVersion
  */
 public function getDraft()
 {
     return $this->fields->getCurrentDraft($this->activeLanguage);
 }