/** * UIConf Add action allows you to add a UIConf to Kaltura DB * * @action add * @param KalturaUiConf $uiConf Mandatory input parameter of type KalturaUiConf * @return KalturaUiConf */ function addAction(KalturaUiConf $uiConf) { $uiConf->validatePropertyNotNull('creationMode'); if ($uiConf->creationMode != KalturaUiConfCreationMode::ADVANCED && $uiConf->creationMode != KalturaUiConfCreationMode::WIZARD) { throw new KalturaAPIException("Should not create MANUAL ui_confs via the API!! MANUAL is deprecated"); } // if not specified set to true (default) if (is_null($uiConf->useCdn)) { $uiConf->useCdn = true; } $dbUiConf = $uiConf->toUiConf(); $dbUiConf->setPartnerId($this->getPartnerId()); $dbUiConf->save(); $uiConf = new KalturaUiConf(); // start from blank $uiConf->fromUiConf($dbUiConf); return $uiConf; }