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


PHP Article::buildArticlePagerConditions方法代码示例

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


在下文中一共展示了Article::buildArticlePagerConditions方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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');
     }
 }
开发者ID:snouhaud,项目名称:camptocamp.org,代码行数:60,代码来源:Site.class.php

示例2: buildAreaPagerConditions

 public static function buildAreaPagerConditions(&$q, &$joins, $is_module = false, $is_linked = false, $first_join = null, $ltype = null)
 {
     $join = 'area';
     if ($is_module) {
         $m = 'm';
         $linked = '';
         $main_join = $m . '.geoassociations';
         $linked_join = $m . '.LinkedAssociation';
     } else {
         $m = 'lo.';
         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) {
                     if ($ltype) {
                         $q->addWhere($m . ".type = '{$ltype}'");
                     }
                 }
             }
             if (isset($joins[$join])) {
                 $q->leftJoin($m . '.' . $linked . 'Area a');
             }
         }
     }
     if (isset($joins[$join . '_i18n'])) {
         $q->leftJoin($m . '.' . $linked . 'AreaI18n ai');
     }
     if (isset($joins['join_aarticle'])) {
         Article::buildArticlePagerConditions($q, $joins, false, 'a', false, $linked_join, 'ac');
     }
 }
开发者ID:snouhaud,项目名称:camptocamp.org,代码行数:47,代码来源:Area.class.php

示例3: buildImagePagerConditions

 public static function buildImagePagerConditions(&$q, &$joins, $is_module = false, $ltype = null, $from_users = false)
 {
     $join = 'image';
     if ($is_module) {
         $m = 'm';
         $main_join = $m . '.associations';
     } else {
         $m = 'li';
         $join_id = $join . '_id';
         if (!$from_users) {
             $main_join = $m . '.MainMainAssociation';
             if (isset($joins[$join_id])) {
                 self::joinOnMulti($q, $joins, $join_id, "m.LinkedAssociation {$m}", 5);
                 if (isset($joins[$join_id . '_has'])) {
                     $q->addWhere($m . "1.type = '{$ltype}'");
                 }
             }
         } else {
             $m = $m . '1';
             $main_join = $m . '.MainAssociation';
             $q->leftJoin("m.history_metadata hm")->leftJoin("hm.versions {$m}")->addWhere("{$m}.version = 1");
             if (isset($joins[$join . '_id_has'])) {
                 $q->leftJoin("{$m}.LinkedAssociation li2")->addWhere("li2.type = '{$ltype}'");
             }
         }
         if (isset($joins['post_' . $join]) || isset($joins[$join]) || isset($joins[$join . '_idi18n']) || isset($joins[$join . '_i18n'])) {
             if (!$from_users) {
                 $q->leftJoin("m.LinkedAssociation {$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 . '.' . 'Image i');
             }
         }
     }
     if (isset($joins[$join . '_i18n'])) {
         $q->leftJoin($m . '.' . 'ImageI18n ii');
     }
     if (isset($joins['join_iarticle'])) {
         Article::buildArticlePagerConditions($q, $joins, false, 'i', false, $main_join, 'ci');
     }
 }
开发者ID:snouhaud,项目名称:camptocamp.org,代码行数:46,代码来源:Image.class.php

示例4: buildUserPagerConditions

 public static function buildUserPagerConditions(&$q, &$joins, $is_module = false, $is_linked = false, $first_join = null, $ltype = null)
 {
     $join = 'user';
     if ($is_module) {
         $m = 'm';
         $linked = '';
         $main_join = $m . '.associations';
         $linked_join = $m . '.LinkedAssociation';
         $private_data = 'private_data';
     } else {
         $m = 'lu';
         $private_data = 'UserPrivateData';
         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 . 'User u');
             }
         }
     }
     if (isset($joins[$join . '_pd'])) {
         $q->leftJoin($m . '.' . $linked . $private_data . ' upd');
     }
     if (isset($joins[$join . '_i18n'])) {
         $q->leftJoin($m . '.' . $linked . 'UserI18n ui');
     }
     if (isset($joins['join_uarticle'])) {
         Article::buildArticlePagerConditions($q, $joins, false, 'u', false, $linked_join, 'uc');
     }
 }
开发者ID:snouhaud,项目名称:camptocamp.org,代码行数:50,代码来源:User.class.php

示例5: buildBookPagerConditions

 public static function buildBookPagerConditions(&$q, &$joins, $is_module = false, $prefix = '', $is_linked = false, $first_join = null, $ltype = null)
 {
     $join = $prefix . 'book';
     if ($is_module) {
         $m = 'm';
         $linked = '';
         $linked2 = '';
         $linked_join = $m . '.associations';
     } else {
         $m = 'l' . $prefix . 'b';
         if ($is_linked) {
             $linked = 'Linked';
             $linked2 = '';
         } else {
             $linked = '';
             $linked2 = 'Linked';
         }
         $linked_join = $m . '.' . $linked2 . 'LinkedAssociation';
         $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 . 'Book ' . $prefix . 'b');
             }
         }
     }
     if (isset($joins[$join . '_i18n'])) {
         $q->leftJoin($m . '.' . $linked . 'BookI18n ' . $prefix . 'bi');
     }
     if (isset($joins['join_' . $prefix . 'barticle'])) {
         Article::buildArticlePagerConditions($q, $joins, false, $prefix . 'b', false, $linked_join, 'bc');
     }
 }
开发者ID:snouhaud,项目名称:camptocamp.org,代码行数:44,代码来源:Book.class.php

示例6: 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');
     }
 }
开发者ID:snouhaud,项目名称:camptocamp.org,代码行数:60,代码来源:Parking.class.php

示例7: 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);
     }
 }
开发者ID:snouhaud,项目名称:camptocamp.org,代码行数:80,代码来源:Article.class.php

示例8: 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');
     }
 }
开发者ID:snouhaud,项目名称:camptocamp.org,代码行数:49,代码来源:Hut.class.php


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