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