当前位置: 首页>>代码示例>>PHP>>正文


PHP uiConfPeer::retrieveByPK方法代码示例

本文整理汇总了PHP中uiConfPeer::retrieveByPK方法的典型用法代码示例。如果您正苦于以下问题:PHP uiConfPeer::retrieveByPK方法的具体用法?PHP uiConfPeer::retrieveByPK怎么用?PHP uiConfPeer::retrieveByPK使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在uiConfPeer的用法示例。


在下文中一共展示了uiConfPeer::retrieveByPK方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: execute

 /**
  * Will forward to the uploader swf according to the ui_conf_id 
  */
 public function execute()
 {
     $ui_conf_id = $this->getRequestParameter("ui_conf_id");
     $uiConf = uiConfPeer::retrieveByPK($ui_conf_id);
     if (!$uiConf) {
         KExternalErrors::dieError(KExternalErrors::UI_CONF_NOT_FOUND, "UI conf not found");
     }
     $partner_id = $uiConf->getPartnerId();
     $subp_id = $uiConf->getSubpId();
     $host = requestUtils::getRequestHost();
     $ui_conf_swf_url = $uiConf->getSwfUrl();
     if (!$ui_conf_swf_url) {
         KExternalErrors::dieError(KExternalErrors::ILLEGAL_UI_CONF, "SWF URL not found in UI conf");
     }
     if (kString::beginsWith($ui_conf_swf_url, "http")) {
         $swf_url = $ui_conf_swf_url;
         // absolute URL
     } else {
         $use_cdn = $uiConf->getUseCdn();
         $cdn_host = $use_cdn ? myPartnerUtils::getCdnHost($partner_id) : myPartnerUtils::getHost($partner_id);
         $swf_url = $cdn_host . myPartnerUtils::getUrlForPartner($partner_id, $subp_id) . $ui_conf_swf_url;
         // relative to the current host
     }
     $conf_vars = $uiConf->getConfVars();
     if ($conf_vars) {
         $conf_vars = "&" . $conf_vars;
     }
     $params = "host=" . $host . "&uiConfId=" . $ui_conf_id . $conf_vars;
     KExternalErrors::terminateDispatch();
     $this->redirect("{$swf_url}?{$params}");
 }
开发者ID:DBezemer,项目名称:server,代码行数:34,代码来源:kuploadAction.class.php

示例2: execute

 /**
  * Will forward to the regular swf player according to the widget_id 
  */
 public function execute()
 {
     $ui_conf_id = $this->getRequestParameter("ui_conf_id");
     $uiConf = uiConfPeer::retrieveByPK($ui_conf_id);
     if (!$uiConf) {
         die;
     }
     $partner_id = $uiConf->getPartnerId();
     $subp_id = $uiConf->getSubpId();
     $host = myPartnerUtils::getHost($partner_id);
     $ui_conf_swf_url = $uiConf->getSwfUrl();
     if (!$ui_conf_swf_url) {
         $ui_conf_swf_url = "/swf/simpleeditor.swf";
     }
     if (kString::beginsWith($ui_conf_swf_url, "http")) {
         $swf_url = $ui_conf_swf_url;
         // absolute URL
     } else {
         $use_cdn = $uiConf->getUseCdn();
         $cdn_host = $use_cdn ? myPartnerUtils::getCdnHost($partner_id) : myPartnerUtils::getHost($partner_id);
         $swf_url = $cdn_host . myPartnerUtils::getUrlForPartner($partner_id, $subp_id) . $ui_conf_swf_url;
         // relative to the current host
     }
     // handle buggy case for backward compatiblity
     $partner_host = $host;
     if ($partner_host == "http://www.kaltura.com") {
         $partner_host = 1;
     }
     // otherwise the kse will build a flawed url with [[IMPORT]]
     $params = "contentUrl=" . urlencode($swf_url) . "&host=" . str_replace("http://", "", str_replace("https://", "", $partner_host)) . "&cdnHost=" . str_replace("http://", "", str_replace("https://", "", myPartnerUtils::getCdnHost($partner_id))) . "&uiConfId=" . $ui_conf_id . "&disableurlhashing=" . kConf::get('disable_url_hashing');
     $wrapper_swf = myContentStorage::getFSFlashRootPath() . "/flexwrapper/" . kConf::get('editors_flex_wrapper_version') . "/FlexWrapper.swf";
     $this->redirect($host . myPartnerUtils::getUrlForPartner($partner_id, $subp_id) . "{$wrapper_swf}?{$params}");
 }
开发者ID:DBezemer,项目名称:server,代码行数:36,代码来源:kseAction.class.php

示例3: execute

 /**
  * Will return a JS library for integrating the KSR (similar to HTML5 in concept)
  * uiconfId specifies from which uiconf to fetch different settings that should be replaced in the JS
  */
 public function execute()
 {
     // make sure output is not parsed as HTML
     header("Content-type: application/x-javascript");
     $uiconfId = $this->getRequestParameter("uiconfId");
     // replace all $_GET with $this->getRequestParameter()
     // load uiconf from DB.
     $this->uiconfObj = uiConfPeer::retrieveByPK($uiconfId);
     if (!$this->uiconfObj) {
         KExternalErrors::dieError(KExternalErrors::UI_CONF_NOT_FOUND);
     }
     $ui_conf_swf_url = $this->uiconfObj->getSwfUrl();
     if (!$ui_conf_swf_url) {
         KExternalErrors::dieError(KExternalErrors::ILLEGAL_UI_CONF, "SWF URL not found in UI conf");
     }
     @libxml_use_internal_errors(true);
     try {
         $this->uiconfXmlObj = new SimpleXMLElement(trim($this->uiconfObj->getConfFile()));
     } catch (Exception $e) {
         KalturaLog::debug("malformed uiconf XML - base64 encoded: [" . base64_encode(trim($this->uiconfObj->getConfFile())) . "]");
     }
     if (!$this->uiconfXmlObj instanceof SimpleXMLElement) {
         // no xml or invalid XML, so throw exception
         throw new Exception('uiconf XML is invalid');
     }
     // unsupress the xml errors
     @libxml_use_internal_errors(false);
     $this->_initReplacementTokens();
     $this->_prepareLibJs();
     $this->_prepareJs();
     echo $this->jsResult;
     die;
 }
开发者ID:kubrickfr,项目名称:server,代码行数:37,代码来源:ksrAction.class.php

示例4: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $this->applyPartnerFilterForClass(new uiConfPeer(), $partner_id);
     $allow_empty = $this->getP("allow_empty_field", false);
     if ($allow_empty == "false" || $allow_empty === 0) {
         $allow_empty = false;
     }
     $prefix = $this->getObjectPrefix();
     $uiconf_id = $this->getPM("{$prefix}_id");
     $uiconf = uiConfPeer::retrieveByPK($uiconf_id);
     if (!$uiconf) {
         $this->addError(APIErrors::INVALID_UI_CONF_ID, $uiconf_id);
         return;
     }
     if ($uiconf && !$uiconf->isValid()) {
         $this->addError(APIErrors::INTERNAL_SERVERL_ERROR, "uiConf object [{$uiconf->getId()}] is not valid");
         return;
     }
     // get the new properties for the uiconf from the request
     $uiconf_update_data = new uiConf();
     $uiconf_update_data->setPartnerId($partner_id);
     // set this once before filling the object and once after
     $obj_wrapper = objectWrapperBase::getWrapperClass($uiconf_update_data, 0);
     $updateable_fields = $obj_wrapper->getUpdateableFields();
     $fields_modified = baseObjectUtils::fillObjectFromMapOrderedByFields($this->getInputParams(), $uiconf_update_data, "{$prefix}_", $updateable_fields, BasePeer::TYPE_PHPNAME, $allow_empty);
     if (count($fields_modified) > 0) {
         if ($uiconf_update_data) {
             baseObjectUtils::fillObjectFromObject($updateable_fields, $uiconf_update_data, $uiconf, baseObjectUtils::CLONE_POLICY_PREFER_NEW, null, BasePeer::TYPE_PHPNAME, $allow_empty);
         }
         $uiconf->save();
     }
     $wrapper = objectWrapperBase::getWrapperClass($uiconf, objectWrapperBase::DETAIL_LEVEL_REGULAR);
     $this->addMsg("{$prefix}", $wrapper);
     $this->addDebug("modified_fields", $fields_modified);
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:35,代码来源:updateuiconfAction.class.php

示例5: execute

 /**
  * Will forward to the uploader swf according to the ui_conf_id 
  */
 public function execute()
 {
     $ui_conf_id = $this->getRequestParameter("ui_conf_id");
     $uiConf = uiConfPeer::retrieveByPK($ui_conf_id);
     if (!$uiConf) {
         die;
     }
     $partner_id = $uiConf->getPartnerId();
     $subp_id = $uiConf->getSubpId();
     $host = requestUtils::getRequestHost();
     $ui_conf_swf_url = $uiConf->getSwfUrl();
     if (!$ui_conf_swf_url) {
         die;
     }
     if (kString::beginsWith($ui_conf_swf_url, "http")) {
         $swf_url = $ui_conf_swf_url;
         // absolute URL
     } else {
         $use_cdn = $uiConf->getUseCdn();
         $cdn_host = $use_cdn ? myPartnerUtils::getCdnHost($partner_id) : myPartnerUtils::getHost($partner_id);
         $swf_url = $cdn_host . myPartnerUtils::getUrlForPartner($partner_id, $subp_id) . $ui_conf_swf_url;
         // relative to the current host
     }
     $conf_vars = $uiConf->getConfVars();
     if ($conf_vars) {
         $conf_vars = "&" . $conf_vars;
     }
     $params = "host=" . $host . "&uiConfId=" . $ui_conf_id . $conf_vars;
     $this->redirect("{$swf_url}?{$params}");
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:33,代码来源:kuploadAction.class.php

示例6: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $this->applyPartnerFilterForClass(new uiConfPeer(), $partner_id);
     $ui_conf_id = $this->getPM("uiconf_id");
     $detailed = $this->getP("detailed", false);
     $new_name = $this->getP("new_name");
     if (!$new_name || $new_name == '') {
         $new_name = null;
     }
     $ui_conf = null;
     if ($ui_conf_id) {
         $ui_conf = uiConfPeer::retrieveByPK($ui_conf_id);
     }
     if (!$ui_conf) {
         $this->addError(APIErrors::INVALID_UI_CONF_ID, $ui_conf_id);
     } else {
         $ui_conf_verride_params = new uiConf();
         $ui_conf_verride_params->setPartnerId($partner_id);
         $ui_conf_verride_params->setDisplayInSearch(1);
         // the cloned ui_conf should NOT be a template
         $new_ui_conf = $ui_conf->cloneToNew($ui_conf_verride_params, $new_name);
         if (!$new_ui_conf) {
             $this->addError(APIErrors::UI_CONF_CLONE_FAILED, $ui_conf_id);
         } else {
             $level = $detailed ? objectWrapperBase::DETAIL_LEVEL_DETAILED : objectWrapperBase::DETAIL_LEVEL_REGULAR;
             $wrapper = objectWrapperBase::getWrapperClass($new_ui_conf, $level);
             // TODO - remove this code when cache works properly when saving objects (in their save method)
             //				$wrapper->removeFromCache( "kshow" , $new_ui_conf->getId() );
             $this->addMsg("uiconf", $wrapper);
         }
     }
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:32,代码来源:cloneuiconfAction.class.php

示例7: execute

 /**
  * Will forward to the regular swf player according to the widget_id
  */
 public function execute()
 {
     // make sure output is not parsed as HTML
     header("Content-type: application/x-javascript");
     $uiconfId = $this->getRequestParameter("uiconfId");
     // replace all $_GET with $this->getRequestParameter()
     // load uiconf from DB.
     $this->uiconfObj = uiConfPeer::retrieveByPK($uiconfId);
     if (!$this->uiconfObj) {
         KExternalErrors::dieError(KExternalErrors::UI_CONF_NOT_FOUND);
     }
     @libxml_use_internal_errors(true);
     $this->uiconfXmlObj = new SimpleXMLElement($this->uiconfObj->getConfFile());
     if (!$this->uiconfXmlObj instanceof SimpleXMLElement) {
         // no xml or invalid XML, so throw exception
         throw new Exception('uiconf XML is invalid');
     }
     // unsupress the xml errors
     @libxml_use_internal_errors(false);
     $this->_initReplacementTokens();
     $this->_prepareLibJs();
     $this->_prepareJs();
     echo $this->jsResult;
     die;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:28,代码来源:ksrAction.class.php

示例8: execute

 /**
  * Will forward to the regular swf player according to the widget_id 
  */
 public function execute()
 {
     $ui_conf_id = $this->getRequestParameter("ui_conf_id");
     $uiConf = uiConfPeer::retrieveByPK($ui_conf_id);
     if (!$uiConf) {
         die;
     }
     $partner_id = $uiConf->getPartnerId();
     $subp_id = $uiConf->getSubpId();
     if (!$subp_id) {
         $subp_id = 0;
     }
     $host = myPartnerUtils::getHost($partner_id);
     $ui_conf_swf_url = $uiConf->getSwfUrl();
     if (!$ui_conf_swf_url) {
         $ui_conf_swf_url = "/swf/ContributionWizard.swf";
     }
     if (kString::beginsWith($ui_conf_swf_url, "http")) {
         $swf_url = $ui_conf_swf_url;
         // absolute URL
     } else {
         $use_cdn = $uiConf->getUseCdn();
         $cdn_host = $use_cdn ? myPartnerUtils::getCdnHost($partner_id) : myPartnerUtils::getHost($partner_id);
         $swf_url = $cdn_host . myPartnerUtils::getUrlForPartner($partner_id, $subp_id) . $ui_conf_swf_url;
         // relative to the current host
     }
     $params = "contentUrl=" . urlencode($swf_url) . "&host=" . str_replace("http://", "", str_replace("https://", "", $host)) . "&cdnHost=" . str_replace("http://", "", str_replace("https://", "", myPartnerUtils::getCdnHost($partner_id))) . "&uiConfId=" . $ui_conf_id;
     $wrapper_swf = myContentStorage::getFSFlashRootPath() . "/flexwrapper/" . kConf::get('kcw_flex_wrapper_version') . "/FlexWrapper.swf";
     $this->redirect($host . myPartnerUtils::getUrlForPartner($partner_id, $subp_id) . "{$wrapper_swf}?{$params}");
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:33,代码来源:kcwAction.class.php

示例9: execute

 public function execute()
 {
     $this->forceSystemAuthentication();
     myDbHelper::$use_alternative_con = null;
     //myDbHelper::DB_HELPER_CONN_PROPEL2
     $uiConfId = $this->getRequestParameter("id");
     $uiConf = uiConfPeer::retrieveByPK($uiConfId);
     $subTypes = array(uiconf::FILE_SYNC_UICONF_SUB_TYPE_DATA, uiconf::FILE_SYNC_UICONF_SUB_TYPE_FEATURES);
     foreach ($subTypes as $subType) {
         if ($subType == uiconf::FILE_SYNC_UICONF_SUB_TYPE_DATA) {
             echo "Data:" . PHP_EOL;
         } else {
             if ($subType == uiconf::FILE_SYNC_UICONF_SUB_TYPE_FEATURES) {
                 echo "Features:" . PHP_EOL;
             }
         }
         $syncKey = $uiConf->getSyncKey($subType);
         if (kFileSyncUtils::file_exists($syncKey)) {
             echo "File sync already exists." . PHP_EOL;
         } else {
             list($rootPath, $filePath) = $uiConf->generateFilePathArr($subType);
             $fullPath = $rootPath . $filePath;
             if (file_exists($fullPath)) {
                 kFileSyncUtils::createSyncFileForKey($syncKey);
                 echo "Created successfully." . PHP_EOL;
             } else {
                 echo "File not found:" . PHP_EOL;
                 echo $fullPath . PHP_EOL;
                 echo "Not creating file sync." . PHP_EOL;
             }
         }
         echo PHP_EOL;
     }
     die;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:35,代码来源:fixUiConfFileSyncAction.class.php

示例10: execute

 /**
  * Will forward to the regular swf player according to the widget_id 
  */
 public function execute()
 {
     $uiconf_id = $this->getRequestParameter('uiconf_id');
     if (!$uiconf_id) {
         KExternalErrors::dieError(KExternalErrors::MISSING_PARAMETER, 'uiconf_id');
     }
     $uiConf = uiConfPeer::retrieveByPK($uiconf_id);
     if (!$uiConf) {
         KExternalErrors::dieError(KExternalErrors::UI_CONF_NOT_FOUND);
     }
     $partner_id = $this->getRequestParameter('partner_id', $uiConf->getPartnerId());
     if (!$partner_id) {
         KExternalErrors::dieError(KExternalErrors::MISSING_PARAMETER, 'partner_id');
     }
     $partner_host = myPartnerUtils::getHost($partner_id);
     $partner_cdnHost = myPartnerUtils::getCdnHost($partner_id);
     $use_cdn = $uiConf->getUseCdn();
     $host = $use_cdn ? $partner_cdnHost : $partner_host;
     $ui_conf_html5_url = $uiConf->getHtml5Url();
     if (kConf::hasMap("optimized_playback")) {
         $optimizedPlayback = kConf::getMap("optimized_playback");
         if (array_key_exists($partner_id, $optimizedPlayback)) {
             // force a specific kdp for the partner
             $params = $optimizedPlayback[$partner_id];
             if (array_key_exists('html5_url', $params)) {
                 $ui_conf_html5_url = $params['html5_url'];
             }
         }
     }
     if (kString::beginsWith($ui_conf_html5_url, "http")) {
         $url = $ui_conf_html5_url;
         // absolute URL
     } else {
         if ($ui_conf_html5_url) {
             $url = $host . $ui_conf_html5_url;
         } else {
             $html5_version = kConf::get('html5_version');
             $url = "{$host}/html5/html5lib/{$html5_version}/mwEmbedLoader.php";
         }
     }
     // append uiconf_id and partner id for optimizing loading of html5 library. append them only for "standard" urls by looking for the mwEmbedLoader.php suffix
     if (kString::endsWith($url, "mwEmbedLoader.php")) {
         $url .= "/p/{$partner_id}/uiconf_id/{$uiconf_id}";
         $entry_id = $this->getRequestParameter('entry_id');
         if ($entry_id) {
             $url .= "/entry_id/{$entry_id}";
         }
     }
     requestUtils::sendCachingHeaders(60);
     header("Pragma:");
     kFile::cacheRedirect($url);
     header("Location:{$url}");
     die;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:57,代码来源:embedIframeJsAction.class.php

示例11: retrieveObject

 /**
  * 
  * @param int $objectType
  * @param string $objectId
  * @return ISyncableFile
  */
 public static function retrieveObject($objectType, $objectId)
 {
     $object = null;
     switch ($objectType) {
         case FileSyncObjectType::ENTRY:
             entryPeer::setUseCriteriaFilter(false);
             $object = entryPeer::retrieveByPK($objectId);
             entryPeer::setUseCriteriaFilter(true);
             break;
         case FileSyncObjectType::UICONF:
             uiConfPeer::setUseCriteriaFilter(false);
             $object = uiConfPeer::retrieveByPK($objectId);
             uiConfPeer::setUseCriteriaFilter(true);
             break;
         case FileSyncObjectType::BATCHJOB:
             BatchJobPeer::setUseCriteriaFilter(false);
             $object = BatchJobPeer::retrieveByPK($objectId);
             BatchJobPeer::setUseCriteriaFilter(true);
             break;
         case FileSyncObjectType::FLAVOR_ASSET:
             assetPeer::setUseCriteriaFilter(false);
             $object = assetPeer::retrieveById($objectId);
             assetPeer::setUseCriteriaFilter(true);
             break;
         case FileSyncObjectType::SYNDICATION_FEED:
             syndicationFeedPeer::setUseCriteriaFilter(false);
             $object = syndicationFeedPeer::retrieveByPK($objectId);
             syndicationFeedPeer::setUseCriteriaFilter(true);
             break;
         case FileSyncObjectType::CONVERSION_PROFILE:
             conversionProfile2Peer::setUseCriteriaFilter(false);
             $object = conversionProfile2Peer::retrieveByPK($objectId);
             conversionProfile2Peer::setUseCriteriaFilter(true);
             break;
         case FileSyncObjectType::FILE_ASSET:
             conversionProfile2Peer::setUseCriteriaFilter(false);
             $object = FileAssetPeer::retrieveByPK($objectId);
             conversionProfile2Peer::setUseCriteriaFilter(true);
             break;
     }
     if ($object == null) {
         $object = KalturaPluginManager::loadObject('ISyncableFile', $objectType, array('objectId' => $objectId));
     }
     if ($object == null) {
         $error = __METHOD__ . " Cannot find object type [" . $objectType . "] with object_id [" . $objectId . "]";
         KalturaLog::err($error);
         throw new kFileSyncException($error);
     }
     return $object;
 }
开发者ID:DBezemer,项目名称:server,代码行数:56,代码来源:kFileSyncObjectManager.php

示例12: addAction

 /**
  * Add new widget, can be attached to entry or kshow
  * SourceWidget is ignored.
  * 
  * @action add
  * @param KalturaWidget $widget
  * @return KalturaWidget
  */
 function addAction(KalturaWidget $widget)
 {
     if ($widget->sourceWidgetId === null && $widget->uiConfId === null) {
         throw new KalturaAPIException(KalturaErrors::SOURCE_WIDGET_OR_UICONF_REQUIRED);
     }
     if ($widget->sourceWidgetId !== null) {
         $sourceWidget = widgetPeer::retrieveByPK($widget->sourceWidgetId);
         if (!$sourceWidget) {
             throw new KalturaAPIException(KalturaErrors::SOURCE_WIDGET_NOT_FOUND, $widget->sourceWidgetId);
         }
         if ($widget->uiConfId === null) {
             $widget->uiConfId = $sourceWidget->getUiConfId();
         }
     }
     if ($widget->uiConfId !== null) {
         $uiConf = uiConfPeer::retrieveByPK($widget->uiConfId);
         if (!$uiConf) {
             throw new KalturaAPIException(KalturaErrors::UICONF_ID_NOT_FOUND, $widget->uiConfId);
         }
     }
     if (!is_null($widget->enforceEntitlement) && $widget->enforceEntitlement == false && kEntitlementUtils::getEntitlementEnforcement()) {
         throw new KalturaAPIException(KalturaErrors::CANNOT_DISABLE_ENTITLEMENT_FOR_WIDGET_WHEN_ENTITLEMENT_ENFORCEMENT_ENABLE);
     }
     if ($widget->entryId !== null) {
         $entry = entryPeer::retrieveByPK($widget->entryId);
         if (!$entry) {
             throw new KalturaAPIException(KalturaErrors::ENTRY_ID_NOT_FOUND, $widget->entryId);
         }
     } elseif ($widget->enforceEntitlement != null && $widget->enforceEntitlement == false) {
         throw new KalturaAPIException(KalturaErrors::CANNOT_DISABLE_ENTITLEMENT_WITH_NO_ENTRY_ID);
     }
     $dbWidget = $widget->toWidget();
     $dbWidget->setPartnerId($this->getPartnerId());
     $dbWidget->setSubpId($this->getPartnerId() * 100);
     $widgetId = $dbWidget->calculateId($dbWidget);
     $dbWidget->setId($widgetId);
     if ($entry && $entry->getType() == entryType::PLAYLIST) {
         $dbWidget->setIsPlayList(true);
     }
     $dbWidget->save();
     $savedWidget = widgetPeer::retrieveByPK($widgetId);
     $widget = new KalturaWidget();
     // start from blank
     $widget->fromObject($savedWidget, $this->getResponseProfile());
     return $widget;
 }
开发者ID:DBezemer,项目名称:server,代码行数:54,代码来源:WidgetService.php

示例13: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $this->applyPartnerFilterForClass('uiConf', $partner_id);
     $prefix = $this->getObjectPrefix();
     $uiconf_id_to_delete = $this->getPM("{$prefix}_id");
     $uiconf_to_delete = uiConfPeer::retrieveByPK($uiconf_id_to_delete);
     if ($uiconf_to_delete && !$uiconf_to_delete->isValid()) {
         $this->addError(APIErrors::INTERNAL_SERVERL_ERROR, "uiConf object [{$uiconf_to_delete->getId()}] is not valid");
         return;
     }
     if (!$uiconf_to_delete) {
         $this->addError(APIErrors::INVALID_UI_CONF_ID, $prefix, $uiconf_id_to_delete);
         return;
     }
     $uiconf_to_delete->setStatus(uiConf::UI_CONF_STATUS_DELETED);
     $uiconf_to_delete->save();
     //		myNotificationMgr::createNotification( notification::NOTIFICATION_TYPE_ENTRY_DELETE , $entry_to_delete );
     $this->addMsg("deleted_" . $prefix, objectWrapperBase::getWrapperClass($uiconf_to_delete, objectWrapperBase::DETAIL_LEVEL_REGULAR));
 }
开发者ID:DBezemer,项目名称:server,代码行数:19,代码来源:deleteuiconfAction.class.php

示例14: execute

 public function execute()
 {
     $this->uiconf_id = $this->getRequestParameter('uiconf_id');
     if (!$this->uiconf_id) {
         KExternalErrors::dieError(KExternalErrors::MISSING_PARAMETER, 'uiconf_id');
     }
     $this->uiConf = uiConfPeer::retrieveByPK($this->uiconf_id);
     if (!$this->uiConf) {
         KExternalErrors::dieError(KExternalErrors::UI_CONF_NOT_FOUND);
     }
     $this->partner_id = $this->getRequestParameter('partner_id', $this->uiConf->getPartnerId());
     if (!$this->partner_id) {
         KExternalErrors::dieError(KExternalErrors::MISSING_PARAMETER, 'partner_id');
     }
     // Single Player parameters
     $this->entry_id = $this->getRequestParameter('entry_id');
     if ($this->entry_id) {
         $entry = entryPeer::retrieveByPK($this->entry_id);
         if ($entry) {
             $this->entry_name = $entry->getName();
             $this->entry_description = $entry->getDescription();
             $this->entry_thumbnail_url = $entry->getThumbnailUrl();
             $flavor_tag = $this->getRequestParameter('flavor_tag', 'iphone');
             $flavor_assets = assetPeer::retrieveReadyFlavorsByEntryIdAndTag($this->entry_id, $flavor_tag);
             $flavor_asset = reset($flavor_assets);
             /* @var $flavor_asset flavorAsset */
             $this->flavor_asset_id = null;
             if ($flavor_asset) {
                 $this->flavor_asset_id = $flavor_asset->getId();
             }
         } else {
             $this->entry_id = null;
         }
     }
     $this->delivery_type = $this->getRequestParameter('delivery');
     // Playlist Parameters
     $this->playlist_id = $this->getRequestParameter('playlist_id');
     $this->playlist_name = $this->getRequestParameter('playlist_name');
     $this->partner_host = myPartnerUtils::getHost($this->partner_id);
     $this->partner_cdnHost = myPartnerUtils::getCdnHost($this->partner_id);
     $this->secure_host = kConf::get('cdn_host_https');
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:42,代码来源:previewAction.class.php

示例15: execute

 public function execute()
 {
     $this->forceSystemAuthentication();
     myDbHelper::$use_alternative_con = null;
     //myDbHelper::DB_HELPER_CONN_PROPEL2
     $this->saved = false;
     $uiConfId = $this->getRequestParameter("id");
     $this->uiConf = uiConfPeer::retrieveByPK($uiConfId);
     if ($this->uiConf->getObjType() != uiConf::UI_CONF_TYPE_CW) {
         die("Not a CW UIConf!");
     }
     if ($this->uiConf->getCreationMode() != uiConf::UI_CONF_CREATION_MODE_ADVANCED) {
         die("Creation mode must be advanced!");
     }
     if ($this->getRequest()->getMethodName() == "POST") {
         $this->uiConf->setConfFile($this->getRequestParameter("confFile"));
         $this->uiConf->save();
         $this->redirect("system/editUiconf?id=" . $this->uiConf->getId());
     }
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:20,代码来源:kcwUiConfEditorAction.class.php


注:本文中的uiConfPeer::retrieveByPK方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。