本文整理汇总了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 ) ;
}