/** * 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; }
/** * 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); }