• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP uiConfPeer类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: 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


示例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();
     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


示例3: clearMemory

 public function clearMemory()
 {
     accessControlPeer::clearInstancePool();
     BatchJobPeer::clearInstancePool();
     BulkUploadResultPeer::clearInstancePool();
     categoryPeer::clearInstancePool();
     EmailIngestionProfilePeer::clearInstancePool();
     entryPeer::clearInstancePool();
     FileSyncPeer::clearInstancePool();
     flavorAssetPeer::clearInstancePool();
     flavorParamsConversionProfilePeer::clearInstancePool();
     flavorParamsOutputPeer::clearInstancePool();
     flavorParamsPeer::clearInstancePool();
     kshowPeer::clearInstancePool();
     mediaInfoPeer::clearInstancePool();
     moderationFlagPeer::clearInstancePool();
     moderationPeer::clearInstancePool();
     notificationPeer::clearInstancePool();
     roughcutEntryPeer::clearInstancePool();
     SchedulerConfigPeer::clearInstancePool();
     SchedulerPeer::clearInstancePool();
     SchedulerStatusPeer::clearInstancePool();
     SchedulerWorkerPeer::clearInstancePool();
     StorageProfilePeer::clearInstancePool();
     syndicationFeedPeer::clearInstancePool();
     TrackEntryPeer::clearInstancePool();
     uiConfPeer::clearInstancePool();
     UploadTokenPeer::clearInstancePool();
     // TODO clear default filters
     // TODO call all memory cleaner plugins
     if (function_exists('gc_collect_cycles')) {
         // php 5.3 and above
         gc_collect_cycles();
     }
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:35,代码来源:KalturaDispatcher.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 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


示例6: 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


示例7: 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


示例8: 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


示例9: 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


示例10: 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


示例11: 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


示例12: 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


示例13: execute

 public function execute()
 {
     $this->forceSystemAuthentication();
     myDbHelper::$use_alternative_con = null;
     $partnerId = $this->getRequestParameter("partnerId", null);
     if ($partnerId !== null) {
         $partnerId = (int) $partnerId;
     }
     $c = new Criteria();
     $c->add(uiConfPeer::PARTNER_ID, $partnerId);
     $c->addDescendingOrderByColumn(uiConfPeer::CREATED_AT);
     $this->uiconfs = uiConfPeer::doSelect($c);
     $partner = PartnerPeer::retrieveByPK($partnerId);
     $this->partner = $partner;
     $this->partnerId = $partnerId;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:16,代码来源:viewUiconfAction.class.php


示例14: 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


示例15: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $this->applyPartnerFilterForClass('uiConf', $partner_id);
     $detailed = $this->getP("detailed", false);
     $detailed_fields = $this->getP("detailed_fields");
     $limit = $this->getP("page_size", 10);
     $limit = $this->maxPageSize($limit);
     $page = $this->getP("page", 1);
     $offset = ($page - 1) * $limit;
     $c = new Criteria();
     // filter
     $filter = new uiConfFilter();
     $fields_set = $filter->fillObjectFromRequest($this->getInputParams(), "filter_", null);
     $this->setExtraFilters($filter);
     $filter->attachToCriteria($c);
     $count = uiConfPeer::doCount($c);
     if ($count > 0) {
         $offset = ($page - 1) * $limit;
         $c->setLimit($limit);
         if ($offset > 0) {
             $c->setOffset($offset);
         }
         $list = uiConfPeer::doSelect($c);
         $level = $detailed ? objectWrapperBase::DETAIL_LEVEL_DETAILED : objectWrapperBase::DETAIL_LEVEL_REGULAR;
     } else {
         // no need to query the data - there is none !
         $list = array();
         $level = objectWrapperBase::DETAIL_LEVEL_REGULAR;
     }
     $this->addMsg("count", $count);
     $this->addMsg("page_size", $limit);
     $this->addMsg("page", $page);
     foreach ($list as $listed_uiConf) {
         if (!$listed_uiConf->isValid()) {
             $this->addError(APIErrors::INTERNAL_SERVERL_ERROR, "uiConf object [{$listed_uiConf->getId()}] is not valid");
             return;
         }
     }
     if ($detailed_fields) {
         $extra_fields = explode(",", $detailed_fields);
         $wrapper = objectWrapperBase::getWrapperClass($list, $level, objectWrapperBase::DETAIL_VELOCITY_DEFAULT, 0, $extra_fields);
     } else {
         $wrapper = objectWrapperBase::getWrapperClass($list, $level);
     }
     $this->addMsg($this->getObjectPrefix(), $wrapper);
 }
开发者ID:DBezemer,项目名称:server,代码行数:46,代码来源:listuiconfsAction.class.php


示例16: 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


示例17: 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


示例18: 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


示例19: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $this->applyPartnerFilterForClass('uiConf', $partner_id);
     $ui_conf_id = $this->getPM("ui_conf_id");
     $detailed = $this->getP("detailed", false);
     $level = $detailed ? objectWrapperBase::DETAIL_LEVEL_DETAILED : objectWrapperBase::DETAIL_LEVEL_REGULAR;
     $ui_conf = uiConfPeer::retrieveByPK($ui_conf_id);
     if ($ui_conf && !$ui_conf->isValid()) {
         $this->addError(APIErrors::INTERNAL_SERVERL_ERROR, "uiConf object [{$ui_conf->getId()}] is not valid");
         return;
     }
     if ($ui_conf) {
         $this->addMsg("ui_conf", objectWrapperBase::getWrapperClass($ui_conf, $level));
         self::$escape_text = true;
         /*
         $service_provider_list = myPartnerUtils::getMediaServiceProviders ( $partner_id , $subp_id );
         $this->addMsg( "config_" , $service_provider_list );
         
         $ui =  array ( "__0_moduleData" => 
         			array ( "moduleUrl" => "main" , 
         			"style" => "SearchView"  , "locale" => "SearchView"  ) ,
         		"__1_moduleData" => 
         			array ( "moduleUrl" => "SearchView.swf" , 
         			"style" => "SearchView"  , "locale" => "SearchView"  ) ,
         		"__2_moduleData" => 
         		array ( "moduleUrl" => "SearchView.swf" , 
         		"style" => "SearchView"  , "locale" => "SearchView"  ) , 
         	"__3_moduleData" => 
         		array ( "moduleUrl" => "SearchView.swf" , 
         		"style" => "SearchView"  , "locale" => "SearchView"  ) ,					
         		
         	) ;
         $this->addMsg( "ui" , $ui );
         */
     } else {
         $this->addError(APIErrors::INVALID_UI_CONF_ID, $ui_conf_id);
         return;
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:39,代码来源:getuiconfAction.class.php


示例20: 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 ($widget->entryId !== null) {
         $entry = entryPeer::retrieveByPK($widget->entryId);
         if (!$entry) {
             throw new KalturaAPIException(KalturaErrors::ENTRY_ID_NOT_FOUND, $widget->entryId);
         }
     }
     $dbWidget = $widget->toWidget();
     $dbWidget->setPartnerId($this->getPartnerId());
     $dbWidget->setSubpId($this->getPartnerId() * 100);
     $widgetId = $dbWidget->calculateId($dbWidget);
     $dbWidget->setId($widgetId);
     $dbWidget->save();
     $savedWidget = widgetPeer::retrieveByPK($widgetId);
     $widget = new KalturaWidget();
     // start from blank
     $widget->fromWidget($savedWidget);
     return $widget;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:46,代码来源:WidgetService.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ui_language类代码示例发布时间:2022-05-23
下一篇:
PHP uiBaseFrm类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap