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


PHP kshowPeer::doSelectJoinAll方法代码示例

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


在下文中一共展示了kshowPeer::doSelectJoinAll方法的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);
     $limit = $this->getP("page_size", 10);
     $page = $this->getP("page", 1);
     //$order_by = int( $this->getP ( "order_by" , -1 ) );
     $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;
     }
     $offset = ($page - 1) * $limit;
     kuserPeer::setUseCriteriaFilter(false);
     entryPeer::setUseCriteriaFilter(false);
     $c = new Criteria();
     // filter
     $filter = new kshowFilter();
     $fields_set = $filter->fillObjectFromRequest($this->getInputParams(), "filter_", null);
     $this->setExtraFilters($filter);
     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_producer_id");
         //$this->getP ( "filter__eq_producer_id" );
         if ($target_puser_id) {
             // TODO - shoud we use the subp_id to retrieve the puser_kuser ?
             $puser_kuser = PuserKuserPeer::retrieveByPartnerAndUid($partner_id, null, $target_puser_id, false);
             if ($puser_kuser) {
                 $filter->set("_eq_producer_id", $puser_kuser->getkuserId());
                 //$this->setP ( "filter__eq_producer_id" , $puser_kuser->getkuserId() );
             }
         }
     }
     $filter->attachToCriteria($c);
     //if ($order_by != -1) kshowPeer::setOrder( $c , $order_by );
     $count = kshowPeer::doCount($c);
     $offset = ($page - 1) * $limit;
     $c->setLimit($limit);
     if ($offset > 0) {
         $c->setOffset($offset);
     }
     if ($detailed) {
         $list = kshowPeer::doSelectJoinAll($c);
         $level = objectWrapperBase::DETAIL_LEVEL_DETAILED;
         // will have to populate the show_entry before according to the ids
         fdb::populateObjects($list, new entryPeer(), "showentryid", "showentry", false);
     } else {
         $list = kshowPeer::doSelect($c);
         $level = objectWrapperBase::DETAIL_LEVEL_REGULAR;
         // will have to populate the show_entry before according to the ids - we display the thumbnail from the showentry
         fdb::populateObjects($list, new entryPeer(), "showentryid", "showentry", false);
     }
     $this->addMsg("count", $count);
     $this->addMsg("page_size", $limit);
     $this->addMsg("page", $page);
     $wrapper = objectWrapperBase::getWrapperClass($list, $level);
     $this->addMsg("kshows", $wrapper);
     if ($use_filter_puser_id) {
         $this->addMsg("user", objectWrapperBase::getWrapperClass($puser_kuser, objectWrapperBase::DETAIL_LEVEL_REGULAR));
     }
     /*
     		$i=0;
     		foreach ( $list as $kshow )
     		{
     			$i++;
     			$wrapper =  objectWrapperBase::getWrapperClass( $kshow  , $level );
     			$this->addMsg ( "kshow$i" , $wrapper ) ;
     		}
     */
     //		echo "bbb count: " . count ($list );
     //		echo "ccc";
     //$this->addMsg ( "kshows" , $wrapper ) ;
 }
开发者ID:DBezemer,项目名称:server,代码行数:74,代码来源:listkshowsAction.class.php


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