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


PHP entryPeer::doSelectJoinKuser方法代码示例

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


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

示例1: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     myDbHelper::$use_alternative_con = myDbHelper::DB_HELPER_CONN_PROPEL3;
     // TODO -  verify permissions for viewing lists
     $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;
     kuserPeer::setUseCriteriaFilter(false);
     //entryPeer::setUseCriteriaFilter( false );
     $c = KalturaCriteria::create(entryPeer::OM_CLASS);
     // filter
     $filter = new entryFilter();
     $fields_set = $filter->fillObjectFromRequest($this->getInputParams(), "filter_", null);
     $this->setExtraFilters($filter);
     $filter->setPartnerSearchScope(baseObjectFilter::MATCH_KALTURA_NETWORK_AND_PRIVATE);
     $desired_status = "status:" . $filter->get("_eq_status") . "," . $filter->get("_in_status");
     $display_deleted = $this->getP("display_deleted", false);
     if ($display_deleted == "false") {
         $display_deleted = false;
     }
     $pos = strpos($desired_status, entryStatus::DELETED);
     if ($display_deleted || $pos !== false) {
         entryPeer::allowDeletedInCriteriaFilter();
     }
     // hack for displaying pre-moderation
     $moderation_status = $filter->get("_in_moderation_status");
     if ($moderation_status && (strpos($moderation_status, "1,5") !== false || strpos($moderation_status, "5,1") !== false)) {
         // this is when the KMC requests the moderated entries
         $filter->set("_in_status", $filter->get("_in_status") . ",5");
         // add the status '5'
     }
     $this->fixModerationStatusForBackwardCompatibility($filter);
     $puser_kuser = null;
     $use_filter_puser_id = $this->getP("use_filter_puser_id", 1);
     if ($use_filter_puser_id == "false") {
         $use_filter_puser_id = false;
     }
     if ($use_filter_puser_id) {
         // if so - assume the producer_id is infact a puser_id and the kuser_id should be retrieved
         $target_puser_id = $filter->get("_eq_user_id");
         if ($target_puser_id !== null) {
             $puser_kuser = PuserKuserPeer::retrieveByPartnerAndUid($partner_id, null, $target_puser_id, false);
             if ($puser_kuser) {
                 $filter->set("_eq_user_id", $puser_kuser->getkuserId());
                 //	$this->setP ( "filter__eq_producer_id" , $puser_kuser->getkuserId() );
             }
         }
     }
     $offset = ($page - 1) * $limit;
     $c->setLimit($limit);
     if ($offset > 0) {
         $c->setOffset($offset);
     }
     $filter->attachToCriteria($c);
     // for some entry types - there are no kshow or kusers - don't join even when detailed
     if ($this->joinOnDetailed()) {
         $list = entryPeer::doSelectJoinKuser($c);
     } else {
         $list = entryPeer::doSelect($c);
     }
     if ($detailed) {
         $level = objectWrapperBase::DETAIL_LEVEL_DETAILED;
     } else {
         $level = objectWrapperBase::DETAIL_LEVEL_REGULAR;
     }
     $count = $c->getRecordsCount();
     $this->addMsg("count", $count);
     $this->addMsg("page_size", $limit);
     $this->addMsg("page", $page);
     myEntryUtils::updatePuserIdsForEntries($list);
     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);
     if ($use_filter_puser_id) {
         $this->addMsg("user", objectWrapperBase::getWrapperClass($puser_kuser, objectWrapperBase::DETAIL_LEVEL_REGULAR));
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:84,代码来源:listentriesAction.class.php


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