當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Site::buildSitePagerConditions方法代碼示例

本文整理匯總了PHP中Site::buildSitePagerConditions方法的典型用法代碼示例。如果您正苦於以下問題:PHP Site::buildSitePagerConditions方法的具體用法?PHP Site::buildSitePagerConditions怎麽用?PHP Site::buildSitePagerConditions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Site的用法示例。


在下文中一共展示了Site::buildSitePagerConditions方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: buildPagerConditions

 public static function buildPagerConditions(&$q, $criteria)
 {
     $conditions = $criteria[0];
     $values = $criteria[1];
     $joins = $criteria[2];
     self::buildAreaIdPagerConditions($q, $joins);
     // join with site / book / article tables only if needed
     if (isset($joins['join_site'])) {
         Site::buildSitePagerConditions($q, $joins, true);
     }
     // join with summit tables only if needed
     if (isset($joins['join_summit'])) {
         Summit::buildSummitPagerConditions($q, $joins, false, false, 'm.associations', 'st');
     }
     // join with hut tables only if needed
     if (isset($joins['join_hut'])) {
         Hut::buildHutPagerConditions($q, $joins, false, false, 'm.associations', 'ht');
     }
     // join with parking tables only if needed
     if (isset($joins['join_parking'])) {
         Parking::buildParkingPagerConditions($q, $joins, false, false, 'm.associations', 'pt');
     }
     // join with outing tables only if needed
     if (isset($joins['join_user'])) {
         $joins['join_outing'] = true;
         $joins['post_outing'] = true;
     }
     if (isset($joins['join_outing'])) {
         Outing::buildOutingPagerConditions($q, $joins, false, true, 'm.LinkedAssociation', 'to');
         if (isset($joins['join_user'])) {
             User::buildUserPagerConditions($q, $joins, false, false, 'lo.MainMainAssociation', 'uo');
         }
     }
     // join with image tables only if needed
     if (isset($joins['join_image_id']) || isset($joins['join_image']) || isset($joins['join_image_i18n']) || isset($joins['join_itag_id'])) {
         Image::buildImagePagerConditions($q, $joins, false, 'pi');
     }
     if (!empty($conditions)) {
         $q->addWhere(implode(' AND ', $conditions), $values);
     }
 }
開發者ID:snouhaud,項目名稱:camptocamp.org,代碼行數:41,代碼來源:Site.class.php

示例2: buildPagerConditions

 public static function buildPagerConditions(&$q, $criteria)
 {
     $conditions = $criteria[0];
     $values = $criteria[1];
     $joins = $criteria[2];
     $route_join = 'm.associations';
     $route_ltype = 'ri';
     $summit_join = 'm.associations';
     $summit_ltype = 'si';
     $hut_join = 'm.associations';
     $hut_ltype = 'hi';
     $parking_join = 'm.associations';
     $parking_ltype = 'pi';
     $site_join = 'm.associations';
     $site_ltype = 'ti';
     self::joinOnLinkedDocMultiRegions($q, $joins);
     if (isset($joins['doc']) || isset($joins['dtag'])) {
         $q->leftJoin('m.associations lid');
         if (isset($joins['dtag'])) {
             $q->leftJoin('lid.LinkedLinkedAssociation ldc');
         }
     }
     // join with image tables only if needed
     if (isset($joins['join_image'])) {
         Image::buildImagePagerConditions($q, $joins, true);
     }
     // join with outing tables only if needed
     if (isset($joins['join_outing'])) {
         Outing::buildOutingPagerConditions($q, $joins, false, false, 'm.associations', 'oi');
         $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['ouser_id'])) {
             $q->leftJoin($route_join . ' lou');
         }
         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 user tables only if needed
     if (isset($joins['user_id'])) {
         $q->leftJoin('m.versions v')->leftJoin('v.history_metadata hm')->addWhere('v.version = 1');
     }
     if (!empty($conditions)) {
         $q->addWhere(implode(' AND ', $conditions), $values);
     }
 }
開發者ID:snouhaud,項目名稱:camptocamp.org,代碼行數:81,代碼來源:Image.class.php

示例3: buildPagerConditions

 public static function buildPagerConditions(&$q, $criteria)
 {
     $conditions = $criteria[0];
     $values = $criteria[1];
     $joins = $criteria[2];
     self::buildAreaIdPagerConditions($q, $joins);
     // join with parking / book / article tables only if needed
     if (isset($joins['join_parking'])) {
         Parking::buildParkingPagerConditions($q, $joins, true);
     }
     // join with huts tables only if needed
     if (isset($joins['join_hut'])) {
         Hut::buildHutPagerConditions($q, $joins, false, true, 'm.LinkedAssociation', 'ph');
     }
     // join with routes tables only if needed
     if (isset($joins['join_summit']) || isset($joins['join_outing'])) {
         $joins['join_route'] = true;
         $joins['post_route'] = true;
     }
     if (isset($joins['join_route'])) {
         Route::buildRoutePagerConditions($q, $joins, false, true, 'm.LinkedAssociation', 'pr');
         if (isset($joins['join_summit'])) {
             Summit::buildSummitPagerConditions($q, $joins, false, false, 'lr.MainAssociation', 'sr');
         }
         if (isset($joins['join_outing'])) {
             Outing::buildOutingPagerConditions($q, $joins, false, true, 'lr.LinkedAssociation', 'ro');
         }
     }
     // join with site tables only if needed
     if (isset($joins['join_site'])) {
         Site::buildSitePagerConditions($q, $joins, false, true, 'm.LinkedAssociation', 'pt');
     }
     // join with image tables only if needed
     if (isset($joins['join_image'])) {
         Image::buildImagePagerConditions($q, $joins, false, 'pi');
     }
     if (!empty($conditions)) {
         $q->addWhere(implode(' AND ', $conditions), $values);
     }
 }
開發者ID:snouhaud,項目名稱:camptocamp.org,代碼行數:40,代碼來源:Parking.class.php

示例4: buildPagerConditions

 public static function buildPagerConditions(&$q, $criteria)
 {
     $conditions = $criteria[0];
     $values = $criteria[1];
     $joins = $criteria[2];
     $route_join = 'm.MainGeoassociations';
     $route_ltype = '';
     $summit_join = 'm.MainGeoassociations';
     $summit_ltype = '';
     $hut_join = 'm.MainGeoassociations';
     $hut_ltype = '';
     $parking_join = 'm.MainGeoassociations';
     $parking_ltype = '';
     $site_join = 'm.MainGeoassociations';
     $site_ltype = '';
     $user_join = 'm.MainGeoassociations';
     $user_ltype = '';
     // join with area tables only if needed
     if (isset($joins['join_area'])) {
         Area::buildAreaPagerConditions($q, $joins, true);
     }
     // join with outing tables only if needed
     if (isset($joins['join_outing'])) {
         Outing::buildOutingPagerConditions($q, $joins, false, false, 'm.MainGeoassociations', '');
         $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';
         $user_join = 'lu.MainAssociations';
         $user_ltype = 'uo';
     }
     // 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 product tables only if needed
     if (isset($joins['join_product'])) {
         Product::buildProductPagerConditions($q, $joins, false, false, 'm.MainGeoassociations', '');
     }
     // join with user tables only if needed
     if (isset($joins['join_user'])) {
         User::buildUserPagerConditions($q, $joins, false, false, $user_join, $user_ltype);
     }
     // join with image tables only if needed
     if (isset($joins['join_image'])) {
         Image::buildImagePagerConditions($q, $joins, false, '');
     }
     if (!empty($conditions)) {
         $q->addWhere(implode(' AND ', $conditions), $values);
     }
 }
開發者ID:snouhaud,項目名稱:camptocamp.org,代碼行數:79,代碼來源:Area.class.php

示例5: 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


注:本文中的Site::buildSitePagerConditions方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。