protected function updateEntryThumbnail(BulkUploadResult $bulkUploadResult) { if ($bulkUploadResult->getEntryStatus() != entryStatus::READY || !strlen($bulkUploadResult->getThumbnailUrl()) || $bulkUploadResult->getThumbnailSaved()) { return; } myEntryUtils::updateThumbnailFromFile($bulkUploadResult->getEntry(), $bulkUploadResult->getThumbnailUrl()); $bulkUploadResult->setThumbnailSaved(true); $bulkUploadResult->save(); }
/** * Function constructs an array of the return values of the bulk upload result and returns it * @param BulkUploadResult $bulkUploadResult * @param kJobData $data * @return array */ protected static function writeEntryBulkUploadResults(BulkUploadResult $bulkUploadResult, kJobData $data) { $values = array($bulkUploadResult->getTitle(), $bulkUploadResult->getDescription(), $bulkUploadResult->getTags(), $bulkUploadResult->getUrl(), $bulkUploadResult->getContentType()); if ($data->getCsvVersion() > 1) { $values[] = $bulkUploadResult->getConversionProfileId(); $values[] = $bulkUploadResult->getAccessControlProfileId(); $values[] = $bulkUploadResult->getCategory(); $values[] = $bulkUploadResult->getScheduleStartDate('Y-m-d\\TH:i:s'); $values[] = $bulkUploadResult->getScheduleEndDate('Y-m-d\\TH:i:s'); $values[] = $bulkUploadResult->getThumbnailUrl(); $values[] = $bulkUploadResult->getPartnerData(); $values[] = $bulkUploadResult->getCreatorId(); $values[] = $bulkUploadResult->getEntitledUsersEdit(); $values[] = $bulkUploadResult->getEntitledUsersPublish(); $values[] = $bulkUploadResult->getOwnerId(); } return $values; }
public function getThumbnailUrl() { return $this->getFromCustomData(self::THUMBNAIL_URL, null, parent::getThumbnailUrl()); }