Example #1
0
 public function toObject($entry = null, $skip = array())
 {
     $entry = parent::toObject($entry, $skip);
     if ($this->editorType === KalturaEditorType::ADVANCED) {
         $entry->setEditorType("kalturaAdvancedEditor");
     } else {
         $entry->setEditorType("kalturaSimpleEditor");
     }
     return $entry;
 }
Example #2
0
 public function toObject($entry = null, $a = array())
 {
     if (is_null($entry)) {
         KalturaLog::debug("Creating new entry");
         $entry = new entry();
     }
     KalturaLog::debug("type: {$this->mediaType} , duration: {$this->msDuration}");
     $entry = parent::toObject($entry);
     /* @var $entry entry */
     if ($this->msDuration && ($entry->getMediaType() == KalturaMediaType::IMAGE || $this->mediaType == KalturaMediaType::IMAGE && $this->msDuration)) {
         throw new KalturaAPIException(KalturaErrors::PROPERTY_VALIDATION_NOT_UPDATABLE, "msDuration");
     }
     return $entry;
 }
Example #3
0
 public function toObject($entry = null, $a = array())
 {
     if (is_null($entry)) {
         $entry = new entry();
     }
     $entry = parent::toObject($entry);
     if ($this->sourceType === KalturaSourceType::SEARCH_PROVIDER) {
         $entry->setSource($this->searchProviderType);
     } else {
         $entry->setSource($this->sourceType);
     }
     return $entry;
 }
 public function toObject($entry = null, $a = array())
 {
     if (is_null($entry)) {
         KalturaLog::debug("Creating new entry");
         $entry = new entry();
     }
     KalturaLog::debug("type: {$this->mediaType} , duration: {$this->msDuration}");
     $entry = parent::toObject($entry);
     if ($entry->mediaType == KalturaMediaType::IMAGE && $entry->msDuration || $this->mediaType == KalturaMediaType::IMAGE && $this->msDuration) {
         throw new KalturaAPIException(KalturaErrors::PROPERTY_VALIDATION_NOT_UPDATABLE, "msDuration");
     }
     if ($this->sourceType === KalturaSourceType::SEARCH_PROVIDER) {
         $entry->setSource($this->searchProviderType);
     } else {
         $entry->setSource(kPluginableEnumsManager::apiToCore('EntrySourceType', $this->sourceType));
     }
     return $entry;
 }