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