本文整理汇总了PHP中Book::buildBookPagerConditions方法的典型用法代码示例。如果您正苦于以下问题:PHP Book::buildBookPagerConditions方法的具体用法?PHP Book::buildBookPagerConditions怎么用?PHP Book::buildBookPagerConditions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Book
的用法示例。
在下文中一共展示了Book::buildBookPagerConditions方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildSitePagerConditions
public static function buildSitePagerConditions(&$q, &$joins, $is_module = false, $is_linked = false, $first_join = null, $ltype = null)
{
$join = 'site';
if ($is_module) {
$m = 'm';
$linked = '';
$main_join = $m . '.associations';
$linked_join = $m . '.LinkedAssociation';
if (isset($joins['site_id'])) {
$q->leftJoin($main_join . ' lt');
if (isset($joins['site_id_has'])) {
$q->addWhere("lt.type = 'tt'");
}
}
if (isset($joins['subsite_id'])) {
$q->leftJoin($linked_join . ' ltt');
if (isset($joins['subsite_id_has'])) {
$q->addWhere("ltt.type = 'tt'");
}
}
} else {
$m = 'lt';
if ($is_linked) {
$linked = 'Linked';
$main_join = $m . 'MainMainAssociation';
$linked_join = $m . '.LinkedAssociation';
} else {
$linked = '';
$main_join = $m . 'MainAssociation';
$linked_join = $m . '.LinkedLinkedAssociation';
}
$join_id = $join . '_id';
if (isset($joins[$join_id])) {
self::joinOnMulti($q, $joins, $join_id, $first_join . " {$m}", 5);
if (isset($joins[$join_id . '_has'])) {
$q->addWhere($m . "1.type = '{$ltype}'");
}
}
if (isset($joins['post_' . $join]) || isset($joins[$join]) || isset($joins[$join . '_idi18n']) || isset($joins[$join . '_i18n'])) {
$q->leftJoin($first_join . " {$m}");
if (isset($joins['post_' . $join]) || isset($joins[$join]) || isset($joins[$join . '_i18n'])) {
if ($ltype) {
$q->addWhere($m . ".type = '{$ltype}'");
}
}
if (isset($joins[$join])) {
$q->leftJoin($m . '.' . $linked . 'Site t');
}
}
}
if (isset($joins[$join . '_i18n'])) {
$q->leftJoin($m . '.' . $linked . 'SiteI18n ti');
}
if (isset($joins['join_tbook'])) {
Book::buildBookPagerConditions($q, $joins, false, 't', false, $main_join, 'bt');
}
if (isset($joins['join_tarticle'])) {
Article::buildArticlePagerConditions($q, $joins, false, 't', false, $linked_join, 'tc');
}
}
示例2: buildPagerConditions
public static function buildPagerConditions(&$q, $criteria)
{
$conditions = $criteria[0];
$values = $criteria[1];
$joins = $criteria[2];
self::joinOnLinkedDocMultiRegions($q, $joins, array(), false);
// join with book / article tables only if needed
if (isset($joins['join_book'])) {
Book::buildBookPagerConditions($q, $joins, true);
}
if (isset($joins['bdoc'])) {
$q->leftJoin('m.associations lbd');
}
// join with image tables only if needed
if (isset($joins['join_image'])) {
Image::buildImagePagerConditions($q, $joins, false, 'bi');
}
if (!empty($conditions)) {
$q->addWhere(implode(' AND ', $conditions), $values);
}
}
示例3: buildPagerConditions
public static function buildPagerConditions(&$q, $criteria)
{
$conditions = $criteria[0];
$values = $criteria[1];
$joins = $criteria[2];
$route_join = 'm.associations';
$route_ltype = 'rc';
$summit_join = 'm.associations';
$summit_ltype = 'sc';
$hut_join = 'm.associations';
$hut_ltype = 'hc';
$parking_join = 'm.associations';
$parking_ltype = 'pc';
$site_join = 'm.associations';
$site_ltype = 'tc';
self::joinOnLinkedDocMultiRegions($q, $joins);
self::joinOnMulti($q, $joins, 'user_id', 'm.associations u', 4);
if (isset($joins['cdoc'])) {
$q->leftJoin('m.associations lcd');
}
// join with article tables only if needed
if (isset($joins['join_article'])) {
Article::buildArticlePagerConditions($q, $joins, true);
}
// join with book tables only if needed
if (isset($joins['join_cbook'])) {
Book::buildBookPagerConditions($q, $joins, false, 'c', false, $main_join, 'bc');
}
// join with outing tables only if needed
if (isset($joins['join_outing'])) {
Outing::buildOutingPagerConditions($q, $joins, false, false, 'm.associations', 'oc');
$route_join = 'lo.MainAssociation';
$route_ltype = 'ro';
$summit_join = 'lr.MainAssociation';
$summit_ltype = 'sr';
$hut_join = 'lr.MainAssociation';
$hut_ltype = 'hr';
$parking_join = 'lr.MainAssociation';
$parking_ltype = 'pr';
$site_join = 'lo.MainAssociation';
$site_ltype = 'to';
if (isset($joins['join_summit']) || isset($joins['join_hut']) || isset($joins['join_parking'])) {
$joins['join_route'] = true;
$joins['post_route'] = true;
}
}
// join with route tables only if needed
if (isset($joins['join_route'])) {
Route::buildRoutePagerConditions($q, $joins, false, false, $route_join, $route_ltype);
$summit_join = 'lr.MainAssociation';
$summit_ltype = 'sr';
$hut_join = 'lr.MainAssociation';
$hut_ltype = 'hr';
$parking_join = 'lr.MainAssociation';
$parking_ltype = 'pr';
}
// join with summit tables only if needed
if (isset($joins['join_summit'])) {
Summit::buildSummitPagerConditions($q, $joins, false, false, $summit_join, $summit_ltype);
}
// join with hut tables only if needed
if (isset($joins['join_hut'])) {
Hut::buildHutPagerConditions($q, $joins, false, false, $hut_join, $hut_ltype);
}
// join with parking tables only if needed
if (isset($joins['join_parking'])) {
Parking::buildParkingPagerConditions($q, $joins, false, false, $parking_join, $parking_ltype);
}
// join with site tables only if needed
if (isset($joins['join_site'])) {
Site::buildSitePagerConditions($q, $joins, false, false, $site_join, $site_ltype);
}
// join with image tables only if needed
if (isset($joins['join_image'])) {
Image::buildImagePagerConditions($q, $joins, false, 'ci');
}
if (!empty($conditions)) {
$q->addWhere(implode(' AND ', $conditions), $values);
}
}
示例4: buildParkingPagerConditions
public static function buildParkingPagerConditions(&$q, &$joins, $is_module = false, $is_linked = false, $first_join = null, $ltype = null, $p = 'p')
{
$join = 'parking';
if ($is_module) {
$m = 'm';
$linked = '';
$main_join = $m . '.associations';
$linked_join = $m . '.LinkedAssociation';
if (isset($joins['parking_id'])) {
$q->leftJoin($main_join . ' lp');
if (isset($joins['parking_id_has'])) {
$q->addWhere("lp.type = 'pp'");
}
}
if (isset($joins['subparking_id'])) {
$q->leftJoin($linked_join . ' lpp');
if (isset($joins['subparking_id_has'])) {
$q->addWhere("lpp.type = 'pp'");
}
}
} else {
$m = 'lp';
if ($is_linked) {
$linked = 'Linked';
$main_join = $m . '.MainMainAssociation';
$linked_join = $m . '.LinkedAssociation';
} else {
$linked = '';
$main_join = $m . '.MainAssociation';
$linked_join = $m . '.LinkedLinkedAssociation';
}
$join_id = $join . '_id';
if (isset($joins[$join_id])) {
self::joinOnMulti($q, $joins, $join_id, $first_join . " {$m}", 5);
if (isset($joins[$join_id . '_has'])) {
$q->addWhere($m . "1.type = '{$ltype}'");
}
}
if (isset($joins['post_' . $join]) || isset($joins[$join]) || isset($joins[$join . '_idi18n']) || isset($joins[$join . '_i18n'])) {
$q->leftJoin($first_join . " {$m}");
if (isset($joins['post_' . $join]) || isset($joins[$join]) || isset($joins[$join . '_i18n'])) {
if ($ltype) {
$q->addWhere($m . ".type = '{$ltype}'");
}
}
if (isset($joins[$join])) {
$q->leftJoin($m . '.' . $linked . 'Parking p');
}
}
}
if (isset($joins[$join . '_i18n'])) {
$q->leftJoin($m . '.' . $linked . 'ParkingI18n pi');
}
if (isset($joins['join_pbook'])) {
Book::buildBookPagerConditions($q, $joins, false, 'p', false, $main_join, 'bp');
}
if (isset($joins['join_particle'])) {
Article::buildArticlePagerConditions($q, $joins, false, 'p', false, $linked_join, 'pc');
}
}
示例5: buildHutPagerConditions
public static function buildHutPagerConditions(&$q, &$joins, $is_module = false, $is_linked = false, $first_join = null, $ltype = null)
{
$join = 'hut';
if ($is_module) {
$m = 'm';
$linked = '';
$linked2 = '';
$main_join = $m . '.associations';
$linked_join = $m . '.LinkedAssociation';
} else {
$m = 'lh';
if ($is_linked) {
$linked = 'Linked';
$main_join = $m . '.MainMainAssociation';
$linked_join = $m . '.LinkedAssociation';
} else {
$linked = '';
$main_join = $m . '.MainAssociation';
$linked_join = $m . '.LinkedLinkedAssociation';
}
$join_id = $join . '_id';
if (isset($joins[$join_id])) {
self::joinOnMulti($q, $joins, $join_id, $first_join . " {$m}", 5);
if (isset($joins[$join_id . '_has'])) {
$q->addWhere($m . "1.type = '{$ltype}'");
}
}
if (isset($joins['post_' . $join]) || isset($joins[$join]) || isset($joins[$join . '_idi18n']) || isset($joins[$join . '_i18n'])) {
$q->leftJoin($first_join . " {$m}");
if (isset($joins['post_' . $join]) || isset($joins[$join]) || isset($joins[$join . '_i18n'])) {
if ($ltype) {
$q->addWhere($m . ".type = '{$ltype}'");
}
}
if (isset($joins[$join])) {
$q->leftJoin($m . '.' . $linked . 'Hut h');
}
}
}
if (isset($joins[$join . '_i18n'])) {
$q->leftJoin($m . '.' . $linked . 'HutI18n hi');
}
if (isset($joins['join_hbook'])) {
Book::buildBookPagerConditions($q, $joins, false, 'h', false, $main_join, 'bh');
}
if (isset($joins['join_harticle'])) {
Article::buildArticlePagerConditions($q, $joins, false, 'h', false, $linked_join, 'hc');
}
}