/** * @param int $metadataId * @param string $url * * @return BatchJob */ public static function addImportMetadataJob($partnerId, $metadataId, $url) { $job = new BatchJob(); $job->setPartnerId($partnerId); $job->setObjectType(kPluginableEnumsManager::apiToCore('BatchJobObjectType', MetadataBatchJobObjectType::METADATA)); $job->setObjectId($metadataId); $data = new kImportMetadataJobData(); $data->setMetadataId($metadataId); $data->setSrcFileUrl($url); return kJobsManager::addJob($job, $data, BatchJobType::METADATA_IMPORT); }
/** * @param int $metadataId * @param string $url * * @return BatchJob */ public static function addImportMetadataJob($partnerId, $metadataId, $url) { $job = new BatchJob(); $job->setPartnerId($partnerId); $data = new kImportMetadataJobData(); $data->setMetadataId($metadataId); $data->setSrcFileUrl($url); return kJobsManager::addJob($job, $data, BatchJobType::METADATA_IMPORT); }