/** * Update Thumb Params by ID * * @action update * @param int $id * @param KalturaThumbParams $thumbParams * @return KalturaThumbParams */ public function updateAction($id, KalturaThumbParams $thumbParams) { $thumbParamsDb = assetParamsPeer::retrieveByPK($id); if (!$thumbParamsDb) { throw new KalturaAPIException(KalturaErrors::FLAVOR_PARAMS_ID_NOT_FOUND, $id); } $thumbParams->toUpdatableObject($thumbParamsDb); $thumbParamsDb->save(); $thumbParams->fromObject($thumbParamsDb); return $thumbParams; }
/** * Update Thumb Params by ID * * @action update * @param int $id * @param KalturaThumbParams $thumbParams * @return KalturaThumbParams */ public function updateAction($id, KalturaThumbParams $thumbParams) { if ($thumbParams->name !== null) { $thumbParams->validatePropertyMinLength("name", 1); } $thumbParamsDb = thumbParamsPeer::retrieveByPK($id); if (!$thumbParamsDb) { throw new KalturaAPIException(KalturaErrors::FLAVOR_PARAMS_ID_NOT_FOUND, $id); } $thumbParams->toUpdatableObject($thumbParamsDb); $thumbParamsDb->save(); $thumbParams->fromObject($thumbParamsDb); return $thumbParams; }