Example #1
0
 /**
  * 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;
 }
 /**
  * Update Caption Params by ID
  * 
  * @param int $id 
  * @param KalturaCaptionParams $captionParams 
  * @return KalturaCaptionParams
  */
 function update($id, KalturaCaptionParams $captionParams)
 {
     $kparams = array();
     $this->client->addParam($kparams, "id", $id);
     $this->client->addParam($kparams, "captionParams", $captionParams->toParams());
     $this->client->queueServiceActionCall("caption_captionparams", "update", $kparams);
     if ($this->client->isMultiRequest()) {
         return $this->client->getMultiRequestResult();
     }
     $resultObject = $this->client->doQueue();
     $this->client->throwExceptionIfError($resultObject);
     $this->client->validateObjectType($resultObject, "KalturaCaptionParams");
     return $resultObject;
 }