protected function prepareEntryForInsert(KalturaBaseEntry $entry, entry $dbEntry = null) { if (!$entry instanceof KalturaMediaEntry) { throw new KalturaAPIException(KalturaErrors::INVALID_ENTRY_TYPE, $entry->id, $entry->getType(), entryType::MEDIA_CLIP); } $entry->validatePropertyNotNull("mediaType"); $conversionQuality = $this->getConversionQuality($entry); if (!is_null($conversionQuality)) { $entry->conversionQuality = $conversionQuality; } $dbEntry = parent::prepareEntryForInsert($entry, $dbEntry); $kshow = $this->createDummyKShow(); $kshowId = $kshow->getId(); $dbEntry->setKshowId($kshowId); $dbEntry->save(); return $dbEntry; }
/** * @param KalturaBaseEntry $entry * @return entry */ protected function prepareEntryForInsert(KalturaBaseEntry $entry) { // first validate the input object //$entry->validatePropertyMinLength("name", 1); $entry->validatePropertyNotNull("mediaType"); $dbEntry = parent::prepareEntryForInsert($entry); if ($this->getConversionQualityFromRequest()) { $dbEntry->setConversionQuality($this->getConversionQualityFromRequest()); } $kshow = $this->createDummyKShow(); $kshowId = $kshow->getId(); $dbEntry->setKshowId($kshowId); $dbEntry->save(); return $dbEntry; }
protected function prepareEntryForInsert(KalturaBaseEntry $entry, entry $dbEntry = null) { // first validate the input object //$entry->validatePropertyMinLength("name", 1); $entry->validatePropertyNotNull("documentType"); $dbEntry = parent::prepareEntryForInsert($entry); if ($entry->conversionProfileId) { $dbEntry->setStatus(entryStatus::PRECONVERT); } else { $dbEntry->setStatus(entryStatus::READY); } $dbEntry->setDefaultModerationStatus(); $dbEntry->save(); return $dbEntry; }