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

PHP objectWrapperBase类代码示例

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

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



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

示例1: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $allow_empty = $this->getP("allow_empty_field", false);
     if ($allow_empty == "false" || $allow_empty === 0) {
         $allow_empty = false;
     }
     $partner = new Partner();
     $obj_wrapper = objectWrapperBase::getWrapperClass($partner, 0);
     $updateable_fields = $obj_wrapper->getUpdateableFields();
     // TODO - use fillObjectFromMapOrderedByFields instead
     $fields_modified = baseObjectUtils::fillObjectFromMap($this->getInputParams(), $partner, "partner_", $updateable_fields, BasePeer::TYPE_PHPNAME, $allow_empty);
     // check that mandatory fields were set
     // TODO
     if (count($fields_modified) > 0) {
         $target_partner = PartnerPeer::retrieveByPK($partner_id);
         if ($partner && $target_partner) {
             if (@$fields_modified["adminEmail"] && $target_partner->getAdminEmail() != $fields_modified["adminEmail"]) {
                 myPartnerUtils::emailChangedEmail($partner_id, $target_partner->getAdminEmail(), $fields_modified["adminEmail"], $target_partner->getName(), PartnerPeer::KALTURAS_PARTNER_EMAIL_CHANGE);
             }
             $partner->setType($target_partner->getType());
             baseObjectUtils::fillObjectFromObject($updateable_fields, $partner, $target_partner, baseObjectUtils::CLONE_POLICY_PREFER_NEW, null, BasePeer::TYPE_PHPNAME, $allow_empty);
             $target_partner->save();
             $this->addMsg("partner", objectWrapperBase::getWrapperClass($target_partner, objectWrapperBase::DETAIL_LEVEL_DETAILED));
             $this->addDebug("added_fields", $fields_modified);
         } else {
             $this->addError(APIErrors::UNKNOWN_PARTNER_ID);
         }
     } else {
         $this->addError(APIErrors::NO_FIELDS_SET_FOR_PARTNER);
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:31,代码来源:updatepartnerAction.class.php


示例2: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $user_id = $this->getPM("user_id");
     $target_puser_kuser = PuserKuserPeer::retrieveByPartnerAndUid($partner_id, null, $user_id, true);
     if (!$target_puser_kuser) {
         $this->addError(APIErrors::INVALID_USER_ID, $user_id);
     }
     $kuser = $target_puser_kuser->getKuser();
     // get the new properties for the kuser from the request
     $kuser_update_data = new kuser();
     $obj_wrapper = objectWrapperBase::getWrapperClass($kuser, 0);
     $fields_modified = baseObjectUtils::fillObjectFromMap($this->getInputParams(), $kuser_update_data, "user_", $obj_wrapper->getUpdateableFields());
     if (count($fields_modified) > 0) {
         if (!$partner_id) {
             $kuser_from_db = kuserPeer::getKuserByScreenName($kuser->getScreenName());
             // check if there is a kuser with such a name in the system (and this kuser is not the current one)
             if ($kuser_from_db && $kuser_from_db->getId() == $kuser->getId()) {
                 $this->addError(APIErrors::USER_ALREADY_EXISTS_BY_SCREEN_NAME, $kuser->getScreenName());
                 return;
             }
         }
         if ($kuser_update_data) {
             baseObjectUtils::fillObjectFromObject($obj_wrapper->getUpdateableFields(), $kuser_update_data, $kuser, baseObjectUtils::CLONE_POLICY_PREFER_NEW, null, BasePeer::TYPE_PHPNAME);
             $target_puser_kuser->setKuser($kuser);
         }
         $kuser->save();
     }
     $wrapper = objectWrapperBase::getWrapperClass($target_puser_kuser, objectWrapperBase::DETAIL_LEVEL_DETAILED);
     $wrapper->removeFromCache("kuser", $kuser->getId());
     $this->addMsg("user", $wrapper);
     $this->addDebug("modified_fields", $fields_modified);
 }
开发者ID:DBezemer,项目名称:server,代码行数:32,代码来源:updateuserAction.class.php


示例3: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     // TODO -  verify permissions for viewing lists
     $detailed = $this->getP("detailed", false);
     $limit = $this->getP("page_size", 10);
     $page = $this->getP("page", 1);
     //$order_by = int( $this->getP ( "order_by" , -1 ) );
     $offset = ($page - 1) * $limit;
     $c = new Criteria();
     $download_types = array(BatchJobType::FLATTEN, BatchJobType::DOWNLOAD);
     $c->add(BatchJobPeer::JOB_TYPE, $download_types, Criteria::IN);
     // filter
     $filter = new BatchJobFilter(true);
     $fields_set = $filter->fillObjectFromRequest($this->getInputParams(), "filter_", null);
     $filter->attachToCriteria($c);
     //if ($order_by != -1) kshowPeer::setOrder( $c , $order_by );
     $count = BatchJobPeer::doCount($c);
     $offset = ($page - 1) * $limit;
     $c->setLimit($limit);
     if ($offset > 0) {
         $c->setOffset($offset);
     }
     $list = BatchJobPeer::doSelect($c);
     $level = objectWrapperBase::DETAIL_LEVEL_REGULAR;
     $this->addMsg("count", $count);
     $this->addMsg("page_size", $limit);
     $this->addMsg("page", $page);
     $wrapper = objectWrapperBase::getWrapperClass($list, $level);
     $this->addMsg("downloads", $wrapper);
 }
开发者ID:DBezemer,项目名称:server,代码行数:30,代码来源:listdownloadsAction.class.php


示例4: execute

 /**
  * Will anipulate a single entry
  */
 public function execute()
 {
     $this->forceSystemAuthentication();
     myDbHelper::$use_alternative_con = null;
     $command = $this->getP("command");
     if ($command == "updateEntry") {
         $id = $this->getP("id");
         $entry = entryPeer::retrieveByPK($id);
         if ($entry) {
             $name = $this->getP("name");
             $value = $this->getP("value");
             $obj_wrapper = objectWrapperBase::getWrapperClass($entry, 0);
             $updateable_fields = $obj_wrapper->getUpdateableFields("2");
             if (!in_array($name, $updateable_fields)) {
                 die;
             }
             if ($name) {
                 $setter = "set" . $name;
                 call_user_func(array($entry, $setter), $value);
                 $entry->save();
             }
         }
     }
     die;
 }
开发者ID:DBezemer,项目名称:server,代码行数:28,代码来源:executeCommandAction.class.php


示例5: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     // get the new properties for the ConversionProfile from the request
     $conv_profile = new ConversionProfile();
     $obj_wrapper = objectWrapperBase::getWrapperClass($conv_profile, 0);
     $fields_modified = baseObjectUtils::fillObjectFromMap($this->getInputParams(), $conv_profile, "conversionProfile_", $obj_wrapper->getUpdateableFields(), BasePeer::TYPE_PHPNAME, true);
     // check that mandatory fields were set
     if (count($fields_modified) > 0) {
         // search if partner already has a conversionProfile similar to the one just added - if exists - use it
         // if not - create it and return it.
         $partner_conv_profile = ConversionProfilePeer::retrieveSimilar($partner_id, $conv_profile);
         if (!$partner_conv_profile) {
             $conv_profile->setPartnerId($partner_id);
             $conv_profile->setEnabled(1);
             $conv_profile->save();
             $partner_conv_profile = $conv_profile;
         }
         // TODO - remove - no need to playaround with the updatedAt for ordering (in the listconversionprofiles service
         //			$partner_conv_profile->setUpdatedAt( time() );
         //			$partner_conv_profile->save();
         $partner = $this->getPartner();
         $partner_current_conversion_profile = $partner->getCurrentConversionProfileType();
         if ($partner_conv_profile->getId() != $partner_current_conversion_profile) {
             $partner->setCurrentConversionProfileType($partner_conv_profile->getId());
             $partner->save();
         }
         $this->addMsg("conversionProfile", objectWrapperBase::getWrapperClass($partner_conv_profile, objectWrapperBase::DETAIL_LEVEL_DETAILED));
         $this->addDebug("added_fields", $fields_modified);
     } else {
         $this->addError(APIErrors::NO_FIELDS_SET_FOR_CONVERSION_PROFILE);
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:32,代码来源:addconversionprofileAction.class.php


示例6: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     if (!$puser_kuser) {
         $this->addError(APIErrors::INVALID_USER_ID, $puser_id);
         return;
     }
     $time_offset = $this->getPM("time_offset");
     $entry_ids = $this->getPM("entry_ids");
     $detailed = $this->getP("detailed", false);
     $separator = $this->getP("separator", ",");
     $id_arr = explode($separator, $entry_ids);
     $limit = 50;
     $id_arr = array_splice($id_arr, 0, $limit);
     $entries = entryPeer::retrieveByPKs($id_arr);
     $updated_entries = array();
     if (!$entries) {
         $this->addError(APIErrors::INVALID_ENTRY_IDS, $entry_ids);
     } else {
         foreach ($entries as $entry) {
             if (!myEntryUtils::createThumbnailFromEntry($entry, $entry, $time_offset)) {
                 $this->addError(APIErrors::INVALID_ENTRY_TYPE, "ENTRY_TYPE_MEDIACLIP [" . $entry->getId() . "]");
                 continue;
             }
             $updated_entries[] = $entry;
             myNotificationMgr::createNotification(kNotificationJobData::NOTIFICATION_TYPE_ENTRY_UPDATE_THUMBNAIL, $entry);
             $wrapper = objectWrapperBase::getWrapperClass($entry, objectWrapperBase::DETAIL_LEVEL_DETAILED);
             $wrapper->removeFromCache("entry", $entry->getId());
         }
     }
     $this->addMsg("entries", objectWrapperBase::getWrapperClass($updated_entries, objectWrapperBase::DETAIL_LEVEL_REGULAR));
 }
开发者ID:DBezemer,项目名称:server,代码行数:31,代码来源:updateentriesthumbnailsAction.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: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $kshow_id = $this->getP("kshow_id");
     $detailed = $this->getP("detailed", false);
     $level = $detailed ? objectWrapperBase::DETAIL_LEVEL_DETAILED : objectWrapperBase::DETAIL_LEVEL_REGULAR;
     $widget_size = $this->getP("size");
     $kshow_from_db = null;
     if ($kshow_id) {
         $kshow_from_db = kshowPeer::retrieveByPK($kshow_id);
     }
     if ($kshow_from_db) {
         $this->addMsg("kshow", objectWrapperBase::getWrapperClass($kshow_from_db, $level));
         $this->addMsg("already_exists_objects", 1);
         $this->addDebug("already_exists_objects", 1);
     } else {
         // no kshow to be found - creae a new one
         parent::executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser);
     }
     // create widget code for the new kshow
     $kshow = $this->getMsg("kshow");
     $kshow_id = $kshow->id;
     list($genericWidget, $myspaceWidget) = myKshowUtils::getEmbedPlayerUrl($kshow_id, null, false, "");
     $code = array("generic_code" => $genericWidget, "myspace_code" => $myspaceWidget);
     $this->addMsg("widget_code", $code);
 }
开发者ID:DBezemer,项目名称:server,代码行数:25,代码来源:generatewidgetAction.class.php


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


示例10: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $this->applyPartnerFilterForClass(new uiConfPeer(), $partner_id);
     $detailed = $this->getDetailed();
     //$this->getP ( "detailed" , false );
     $level = $detailed ? objectWrapperBase::DETAIL_LEVEL_DETAILED : objectWrapperBase::DETAIL_LEVEL_REGULAR;
     // get the new properties for the kuser from the request
     $ui_conf = new uiConf();
     $ui_conf->setPartnerId($partner_id);
     // set this once before filling the object and once after
     // this is called for the first time to set the type and media type for fillObjectFromMap
     $this->setObjType($ui_conf);
     $obj_wrapper = objectWrapperBase::getWrapperClass($ui_conf, 0);
     $field_level = $this->isAdmin() ? 2 : 1;
     $updateable_fields = $obj_wrapper->getUpdateableFields($field_level);
     // TODO - always use fillObjectFromMapOrderedByFields rather than fillObjectFromMap
     $fields_modified = baseObjectUtils::fillObjectFromMapOrderedByFields($this->getInputParams(), $ui_conf, $this->getObjectPrefix() . "_", $updateable_fields);
     // check that mandatory fields were set
     // TODO
     if (count($fields_modified) > 0) {
         $ui_conf->setPartnerId($partner_id);
         // this is now called for the second time to force the obj_type
         $this->setObjType($ui_conf);
         $ui_conf->save();
         $this->addMsg($this->getObjectPrefix(), objectWrapperBase::getWrapperClass($ui_conf, $level));
         $this->addDebug("added_fields", $fields_modified);
     } else {
         $this->addError(APIErrors::NO_FIELDS_SET_FOR_UI_CONF, $this->getObjectPrefix());
     }
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:30,代码来源:adduiconfAction.class.php


示例11: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $entry_id = $this->getPM("entry_id");
     $detailed = $this->getP("detailed", false);
     $entry = null;
     if ($entry_id) {
         $entry = entryPeer::retrieveByPK($entry_id);
     }
     if (!$entry) {
         $this->addError(APIErrors::INVALID_ENTRY_ID, $entry_id);
     } else {
         $kshow_id = $entry->getKshowId();
         $kshow = $entry->getKshow();
         if (!$kshow) {
             $this->addError(APIErrors::INVALID_KSHOW_ID, $kshow_id);
         } else {
             $newKshow = myKshowUtils::shalowCloneById($kshow_id, $puser_kuser->getKuserId());
             if (!$newKshow) {
                 $this->addError(APIErrors::KSHOW_CLONE_FAILED, $kshow_id);
             } else {
                 $newEntry = $newKshow->getShowEntry();
                 $level = $detailed ? objectWrapperBase::DETAIL_LEVEL_DETAILED : objectWrapperBase::DETAIL_LEVEL_REGULAR;
                 $wrapper = objectWrapperBase::getWrapperClass($newEntry, $level);
                 // TODO - remove this code when cache works properly when saving objects (in their save method)
                 $wrapper->removeFromCache("entry", $newEntry->getId());
                 $this->addMsg("entry", $wrapper);
             }
         }
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:30,代码来源:cloneroughcutAction.class.php


示例12: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     if (!$puser_kuser) {
         $this->addError(APIErrors::INVALID_USER_ID, $puser_id);
         return;
     }
     $kshow_id = $this->getPM("kshow_id");
     $kshow = kshowPeer::retrieveByPK($kshow_id);
     // even in case of an error - return the kshow object
     if (!$kshow) {
         $this->addError(APIErrors::INVALID_KSHOW_ID, $kshow_id);
         return;
     } else {
         $desired_version = $this->getPM("kshow_version");
         $result = $kshow->rollbackVersion($desired_version);
         if (!$result) {
             $this->addError(APIErrors::ERROR_KSHOW_ROLLBACK, $kshow_id, $desired_version);
             return;
         }
     }
     // after calling this method - most probably the state of the kshow has changed in the cache
     $wrapper = objectWrapperBase::getWrapperClass($kshow, objectWrapperBase::DETAIL_LEVEL_REGULAR);
     $wrapper->removeFromCache("kshow", $kshow_id);
     $this->addMsg("kshow", $wrapper);
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:25,代码来源:rollbackkshowAction.class.php


示例13: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $kshow_id = $this->getPM("kshow_id");
     $detailed = $this->getP("detailed", false);
     $kshow_indexedCustomData3 = $this->getP("indexedCustomData3");
     $kshow = null;
     if ($kshow_id == kshow::KSHOW_ID_USE_DEFAULT) {
         // see if the partner has some default kshow to add to
         $kshow = myPartnerUtils::getDefaultKshow($partner_id, $subp_id, $puser_kuser);
         if ($kshow) {
             $kshow_id = $kshow->getId();
         }
     } elseif ($kshow_id) {
         $kshow = kshowPeer::retrieveByPK($kshow_id);
     } elseif ($kshow_indexedCustomData3) {
         $kshow = kshowPeer::retrieveByIndexedCustomData3($kshow_indexedCustomData3);
     }
     if (!$kshow) {
         $this->addError(APIErrors::INVALID_KSHOW_ID, $kshow_id);
     } else {
         $level = $detailed ? objectWrapperBase::DETAIL_LEVEL_DETAILED : objectWrapperBase::DETAIL_LEVEL_REGULAR;
         $wrapper = objectWrapperBase::getWrapperClass($kshow, $level);
         // TODO - remove this code when cache works properly when saving objects (in their save method)
         $wrapper->removeFromCache("kshow", $kshow_id);
         $this->addMsg("kshow", $wrapper);
     }
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:27,代码来源:getkshowAction.class.php


示例14: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $kshow_id = $this->getPM("kshow_id");
     $target_puser_id = $this->getPM("user_id");
     $detailed = $this->getP("detailed", false);
     $kshow_indexedCustomData3 = $this->getP("indexedCustomData3");
     $kshow = null;
     if ($kshow_id) {
         $kshow = kshowPeer::retrieveByPK($kshow_id);
     } elseif ($kshow_indexedCustomData3) {
         $kshow = kshowPeer::retrieveByIndexedCustomData3($kshow_indexedCustomData3);
     }
     if (!$kshow) {
         $this->addError(APIErrors::INVALID_KSHOW_ID, $kshow_id);
     } else {
         $new_puser_kuser = PuserKuserPeer::retrieveByPartnerAndUid($partner_id, null, $target_puser_id);
         if (!$new_puser_kuser) {
             $this->addError(APIErrors::INVALID_USER_ID, $target_puser_id);
             return;
         }
         $kshow->setProducerId($new_puser_kuser->getKuserId());
         $kshow->save();
         $level = $detailed ? objectWrapperBase::DETAIL_LEVEL_DETAILED : objectWrapperBase::DETAIL_LEVEL_REGULAR;
         $wrapper = objectWrapperBase::getWrapperClass($kshow, $level);
         // TODO - remove this code when cache works properly when saving objects (in their save method)
         $wrapper->removeFromCache("kshow", $kshow->getId());
         $this->addMsg("kshow", $wrapper);
     }
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:29,代码来源:updatekshowownerAction.class.php


示例15: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $kshow_id = $this->getP("kshow_id", kshow::KSHOW_ID_USE_DEFAULT);
     $entry = null;
     if ($kshow_id == kshow::KSHOW_ID_USE_DEFAULT) {
         // see if the partner has some default kshow to add to
         $kshow = myPartnerUtils::getDefaultKshow($partner_id, $subp_id, $puser_kuser);
         if ($kshow) {
             $kshow_id = $kshow->getId();
         }
     } elseif ($kshow_id == kshow::KSHOW_ID_CREATE_NEW) {
         // if the partner allows - create a new kshow
         $kshow = myPartnerUtils::getDefaultKshow($partner_id, $subp_id, $puser_kuser, null, true);
         if ($kshow) {
             $kshow_id = $kshow->getId();
             $entry = $kshow->getShowEntry();
             // use the newly created kshow's roughcut
         }
     } else {
         $kshow = kshowPeer::retrieveByPK($kshow_id);
     }
     if (!$kshow) {
         // the partner is attempting to add an entry to some invalid or non-existing kwho
         $this->addError(APIErrors::INVALID_KSHOW_ID, $kshow_id);
         return;
     }
     if (!$entry) {
         $entry = $kshow->createEntry(entry::ENTRY_MEDIA_TYPE_SHOW, $kshow->getProducerId(), "&auto_edit.jpg", "");
     }
     $obj_wrapper = objectWrapperBase::getWrapperClass($entry, 0);
     $fields_modified = baseObjectUtils::fillObjectFromMap($this->getInputParams(), $entry, $this->getObjectPrefix() . "_", array("name", "tags", "groupId", "partnerData", "permissions", "screenName", "description", "indexedCustomData1"));
     $entry->save();
     $this->addMsg($this->getObjectPrefix(), objectWrapperBase::getWrapperClass($entry, objectWrapperBase::DETAIL_LEVEL_REGULAR));
     $this->addDebug("added_fields", $fields_modified);
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:35,代码来源:addroughcutentryAction.class.php


示例16: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     // TODO -  verify permissions for viewing lists
     $detailed = $this->getP("detailed", false);
     $limit = $this->getP("page_size", 10);
     $page = $this->getP("page", 1);
     //$order_by = int( $this->getP ( "order_by" , -1 ) );
     $offset = ($page - 1) * $limit;
     //		kuserPeer::setUseCriteriaFilter( false );
     $c = new Criteria();
     // filter
     $filter = new moderationFilter();
     $fields_set = $filter->fillObjectFromRequest($this->getInputParams(), "filter_", null);
     $filter->attachToCriteria($c);
     //if ($order_by != -1) kshowPeer::setOrder( $c , $order_by );
     $count = moderationPeer::doCount($c);
     $offset = ($page - 1) * $limit;
     $c->setLimit($limit);
     if ($offset > 0) {
         $c->setOffset($offset);
     }
     $list = moderationPeer::doSelect($c);
     $level = objectWrapperBase::DETAIL_LEVEL_REGULAR;
     $this->addMsg("count", $count);
     $this->addMsg("page_size", $limit);
     $this->addMsg("page", $page);
     $wrapper = objectWrapperBase::getWrapperClass($list, $level);
     $this->addMsg("moderations", $wrapper);
 }
开发者ID:DBezemer,项目名称:server,代码行数:29,代码来源:listmoderationsAction.class.php


示例17: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $prefix = $this->getObjectPrefix();
     $entry_id = $this->getPM("{$prefix}_id");
     $detailed = false;
     //$this->getP ( "detailed" , false );
     $version = $this->getP("version", false);
     $entry = new entry();
     $entry->setId($entry_id);
     /*		
     	$c = $this->getCriteria(); 
     	if ( $c == null )
     	{
     		$entry = entryPeer::retrieveByPK( $entry_id );
     	}
     	else
     	{
     		$c->add ( entryPeer::ID , $entry_id );
     		$entry = entryPeer::doSelectOne( $c );
     	}
     */
     if (!$entry) {
         $this->addError(APIErrors::INVALID_ENTRY_ID, $prefix, $entry_id);
     } else {
         $level = $detailed ? objectWrapperBase::DETAIL_LEVEL_DETAILED : objectWrapperBase::DETAIL_LEVEL_REGULAR;
         $roughcuts = $entry->getRoughcuts();
         $this->addMsg("count", count($roughcuts));
         $this->addMsg("roughcuts", objectWrapperBase::getWrapperClass($roughcuts, $level));
     }
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:30,代码来源:getentryroughcutsAction.class.php


示例18: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $puser_id_to_delete = $this->getPM("user_id");
     $puser_kuser_to_delete = PuserKuserPeer::retrieveByPartnerAndUid($partner_id, null, $puser_id_to_delete, true);
     if (!$puser_kuser_to_delete) {
         $this->addError(APIErrors::INVALID_USER_ID, $puser_id_to_delete);
         return;
     }
     $kuser = $puser_kuser_to_delete->getKuser();
     if ($kuser) {
         //			$this->addMsg ( "deleted_kuser" , objectWrapperBase::getWrapperClass( $kuser , objectWrapperBase::DETAIL_LEVEL_REGULAR ) );
         try {
             $kuser->setStatus(KalturaUserStatus::DELETED);
         } catch (kUserException $e) {
             $code = $e->getCode();
             if ($code == kUserException::CANNOT_DELETE_OR_BLOCK_ROOT_ADMIN_USER) {
                 $this->addException(APIErrors::CANNOT_DELETE_OR_BLOCK_ROOT_ADMIN_USER);
                 return null;
             }
             throw $e;
         }
     }
     $puser_kuser_to_delete->delete();
     $this->addMsg("deleted_user", objectWrapperBase::getWrapperClass($puser_kuser_to_delete, objectWrapperBase::DETAIL_LEVEL_DETAILED));
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:25,代码来源:deleteuserAction.class.php


示例19: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $clazz_name = $this->getP("clazz");
     if ($clazz_name == "kshow") {
         $obj = new kshow();
     } else {
         if ($clazz_name == "kuser") {
             $obj = new kuser();
         } else {
             if ($clazz_name == "entry") {
                 $obj = new entry();
             } else {
                 if ($clazz_name == "PuserKuser") {
                     $obj = new PuserKuser();
                 }
             }
         }
     }
     $obj = new $clazz_name();
     $detailed = $this->getP("detailed");
     $level = $detailed ? objectWrapperBase::DETAIL_LEVEL_DETAILED : objectWrapperBase::DETAIL_LEVEL_REGULAR;
     $wrapper = objectWrapperBase::getWrapperClass($obj, $level);
     if ($wrapper) {
         $this->addMsg("regular", $wrapper->getRegularFields());
         $this->addMsg("detailed", $wrapper->getDetailedFields());
         $this->addMsg("objects", $wrapper->getObjectTypes());
     } else {
         $this->addError("Cannot find object fo type [{$clazz_name}]");
     }
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:30,代码来源:objdetailsAction.class.php


示例20: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     // it is very common to expect an updated ui_conf object
     objectWrapperBase::useCache(false);
     $widget_id = $this->getPM("widget_id");
     $detailed = $this->getP("detailed", false);
     $uiconf_id = $this->getP("uiconf_id", $this->getP("ui_conf_id", null));
     self::$escape_text = true;
     //$widget = widgetPeer::retrieveByHashedId( $widget_id );
     $widget = widgetPeer::retrieveByPK($widget_id);
     if (!$widget) {
         $this->addError(APIErrors::INVALID_WIDGET_ID, $widget_id);
     } else {
         // check if this widget is public - if so , create a ks for viewing the related kshow
         if ($uiconf_id) {
             $widget->overrideUiConfId($uiconf_id);
         }
         // make sure the validation is done before leaving the action -
         // because the getWidgetHtml might throw an exception - it's better to envke it here rather than tht UI
         $widget->getWidgetHtml();
         // TODO - call
         //$result = kSessionUtils::startKSession ( $partner_id , $this->getP ( "secret" ) , $puser_id , $ks , $expiry , $admin , "" , $privileges );
         $level = $detailed ? objectWrapperBase::DETAIL_LEVEL_DETAILED : objectWrapperBase::DETAIL_LEVEL_REGULAR;
         $this->addMsg("widget", objectWrapperBase::getWrapperClass($widget, $level));
     }
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:26,代码来源:getwidgetAction.class.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP ocp_tempcode类代码示例发布时间:2022-05-23
下一篇:
PHP objectInfo类代码示例发布时间: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