本文整理汇总了PHP中Summit::buildSummitListCriteria方法的典型用法代码示例。如果您正苦于以下问题:PHP Summit::buildSummitListCriteria方法的具体用法?PHP Summit::buildSummitListCriteria怎么用?PHP Summit::buildSummitListCriteria使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Summit
的用法示例。
在下文中一共展示了Summit::buildSummitListCriteria方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildListCriteria
public static function buildListCriteria($params_list)
{
$criteria = $conditions = $values = $joins = $joins_order = array();
$criteria[0] = array();
// conditions
$criteria[1] = array();
// values
$criteria[2] = array();
// joins
$criteria[3] = array();
// joins for order
// criteria for disabling personal filter
self::buildPersoCriteria($conditions, $values, $joins, $params_list, 'sites');
// orderby criteria
$orderby_list = c2cTools::getRequestParameterArray(array('orderby', 'orderby2', 'orderby3'));
self::buildOrderCondition($joins_order, $orderby_list, array('tnam'), array('site_i18n', 'join_site'));
// area criteria
self::buildAreaCriteria($criteria, $params_list, 's');
// return if no criteria
if (isset($joins['all']) || empty($params_list)) {
$criteria[0] = array_merge($criteria[0], $conditions);
$criteria[1] = array_merge($criteria[1], $values);
$criteria[2] += $joins;
$criteria[3] += $joins_order;
return $criteria;
}
// site criteria
$has_name = Site::buildSiteListCriteria($criteria, $params_list, true);
if ($has_name === 'no_result') {
return $has_name;
}
// summit criteria
$has_name = Summit::buildSummitListCriteria($criteria, $params_list, false, 'main_id');
if ($has_name === 'no_result') {
return $has_name;
}
// hut criteria
$has_name = Hut::buildHutListCriteria($criteria, $params_list, false, 'main_id');
if ($has_name === 'no_result') {
return $has_name;
}
// parking criteria
$has_name = Parking::buildParkingListCriteria($criteria, $params_list, false, 'main_id');
if ($has_name === 'no_result') {
return $has_name;
}
// outing criteria
$has_name = Outing::buildOutingListCriteria($criteria, $params_list, false, 'linked_id');
if ($has_name === 'no_result') {
return $has_name;
}
// user criteria
$has_name = User::buildUserListCriteria($criteria, $params_list, false, 'main_id');
if ($has_name === 'no_result') {
return $has_name;
}
// image criteria
$has_name = Image::buildImageListCriteria($criteria, $params_list, false);
if ($has_name === 'no_result') {
return $has_name;
}
$criteria[0] = array_merge($criteria[0], $conditions);
$criteria[1] = array_merge($criteria[1], $values);
$criteria[2] += $joins;
$criteria[3] += $joins_order;
return $criteria;
}
示例2: buildListCriteria
public static function buildListCriteria($params_list)
{
$criteria = $conditions = $values = $joins = $joins_order = array();
$criteria[0] = array();
// conditions
$criteria[1] = array();
// values
$criteria[2] = array();
// joins
$criteria[3] = array();
// joins for order
// criteria for disabling personal filter
self::buildPersoCriteria($conditions, $values, $joins, $params_list, 'images');
// orderby criteria
$orderby_list = c2cTools::getRequestParameterArray(array('orderby', 'orderby2', 'orderby3'));
self::buildOrderCondition($joins_order, $orderby_list, array('inam'), array('image_i18n', 'join_image'));
self::buildOrderCondition($joins_order, $orderby_list, array('odate'), array('outing', 'join_outing'));
self::buildOrderCondition($joins_order, $orderby_list, array('oid'), array('post_outing', 'join_outing'));
self::buildOrderCondition($joins, $orderby_list, array('oid', 'odate'), array('post_outing', 'join_outing'));
// area criteria
self::buildAreaCriteria($criteria, $params_list, 'i');
// return if no criteria
if (isset($joins['all']) || empty($params_list)) {
$criteria[0] = array_merge($criteria[0], $conditions);
$criteria[1] = array_merge($criteria[1], $values);
$criteria[2] += $joins;
$criteria[3] += $joins_order;
return $criteria;
}
// image criteria
$has_name = Image::buildImageListCriteria($criteria, $params_list, true);
self::buildConditionItem($conditions, $values, $joins, $params_list, 'Join', '', 'join', '');
if ($has_name === 'no_result') {
return $has_name;
}
// document criteria
self::buildConditionItem($conditions, $values, $joins, $params_list, 'List', 'lid.main_id', 'docs', 'doc');
self::buildConditionItem($conditions, $values, $joins, $params_list, 'List', 'ldc.linked_id', 'dtags', 'dtag');
// summit criteria
$has_name = Summit::buildSummitListCriteria($criteria, $params_list, false, 'main_id');
if ($has_name === 'no_result') {
return $has_name;
}
// hut criteria
$has_name = Hut::buildHutListCriteria($criteria, $params_list, false, 'main_id');
if ($has_name === 'no_result') {
return $has_name;
}
// parking criteria
$has_name = Parking::buildParkingListCriteria($criteria, $params_list, false, 'main_id');
if ($has_name === 'no_result') {
return $has_name;
}
// route criteria
$has_name = Route::buildRouteListCriteria($criteria, $params_list, false, 'main_id');
if ($has_name === 'no_result') {
return $has_name;
}
// site criteria
$has_name = Site::buildSiteListCriteria($criteria, $params_list, false, 'main_id');
if ($has_name === 'no_result') {
return $has_name;
}
// outing criteria
$has_name = Outing::buildOutingListCriteria($criteria, $params_list, false, 'main_id');
if ($has_name === 'no_result') {
return $has_name;
}
// user criteria
self::buildConditionItem($conditions, $values, $joins, $params_list, 'List', 'hm.user_id', 'users', 'user_id');
// TODO here we should restrict to initial uploader (ticket #333)
self::buildConditionItem($conditions, $values, $joins, $params_list, 'List', 'lou.main_id', 'ousers', array('ouser_id', 'join_outing', 'post_outing'));
$criteria[0] = array_merge($criteria[0], $conditions);
$criteria[1] = array_merge($criteria[1], $values);
$criteria[2] += $joins;
$criteria[3] += $joins_order;
return $criteria;
}
示例3: buildListCriteria
public static function buildListCriteria($params_list)
{
$criteria = $conditions = $values = $joins = $joins_order = array();
$criteria[0] = array();
// conditions
$criteria[1] = array();
// values
$criteria[2] = array();
// joins
$criteria[3] = array();
// joins for order
// criteria for enabling/disabling personal filter
self::buildPersoCriteria($conditions, $values, $joins, $params_list, 'outings');
// orderby criteria
$orderby_list = c2cTools::getRequestParameterArray(array('orderby', 'orderby2', 'orderby3'));
self::buildOrderCondition($joins_order, $orderby_list, array('onam'), array('outing_i18n', 'join_outing'));
self::buildOrderCondition($joins_order, $orderby_list, array('lat', 'lon'), array('summit', 'join_summit'));
//FIXME : Don't work : $outings_sort_route_criteria = sfConfig::get('app_outings_sort_route_criteria');
$outings_sort_route_criteria = array('fac', 'time', 'ralt', 'dhei', 'grat', 'erat', 'prat', 'frat', 'arat', 'irat', 'mrat', 'trat', 'sexpo', 'lrat', 'srat', 'hrat', 'wrat');
self::buildOrderCondition($joins_order, $orderby_list, $outings_sort_route_criteria, array('route', 'join_route'));
// area criteria
self::buildAreaCriteria($criteria, $params_list, 'o');
// return if no criteria
if (isset($joins['all']) || empty($params_list)) {
$criteria[0] = array_merge($criteria[0], $conditions);
$criteria[1] = array_merge($criteria[1], $values);
$criteria[2] += $joins;
$criteria[3] += $joins_order;
return $criteria;
}
// outing / article criteria
$has_name = Outing::buildOutingListCriteria($criteria, $params_list, true);
if ($has_name === 'no_result') {
return $has_name;
}
// summit criteria
$has_name = Summit::buildSummitListCriteria($criteria, $params_list, false, 'main_id');
if ($has_name === 'no_result') {
return $has_name;
}
// hut criteria
$has_name = Hut::buildHutListCriteria($criteria, $params_list, false, 'main_id');
if ($has_name === 'no_result') {
return $has_name;
}
// parking criteria
$has_name = Parking::buildParkingListCriteria($criteria, $params_list, false, 'main_id');
if ($has_name === 'no_result') {
return $has_name;
}
// route criteria
$has_name = Route::buildRouteListCriteria($criteria, $params_list, false, 'main_id');
if ($has_name === 'no_result') {
return $has_name;
}
// site criteria
$has_name = Site::buildSiteListCriteria($criteria, $params_list, false, 'main_id');
if ($has_name === 'no_result') {
return $has_name;
}
// user criteria
$has_name = User::buildUserListCriteria($criteria, $params_list, false, 'main_id');
if ($has_name === 'no_result') {
return $has_name;
}
// image criteria
$has_name = Image::buildImageListCriteria($criteria, $params_list, false);
if ($has_name === 'no_result') {
return $has_name;
}
$criteria[0] = array_merge($criteria[0], $conditions);
$criteria[1] = array_merge($criteria[1], $values);
$criteria[2] += $joins;
$criteria[3] += $joins_order;
return $criteria;
}
示例4: buildListCriteria
public static function buildListCriteria($params_list)
{
$criteria = $conditions = $values = $joins = $joins_order = array();
$criteria[0] = array();
// conditions
$criteria[1] = array();
// values
$criteria[2] = array();
// joins
$criteria[3] = array();
// joins for order
// criteria for disabling personal filter
self::buildPersoCriteria($conditions, $values, $joins, $params_list, 'users');
// criteria to hide users whithout public profile
if (!sfContext::getInstance()->getUser()->isConnected()) {
$conditions[] = 'upd.is_profile_public IS TRUE';
$joins['user_pd'] = true;
$joins['join_user'] = true;
if (isset($joins['all'])) {
unset($joins['all']);
}
}
// orderby criteria
$orderby_list = c2cTools::getRequestParameterArray(array('orderby', 'orderby2', 'orderby3'));
self::buildOrderCondition($joins_order, $orderby_list, array('unam'), array('user_i18n', 'join_user'));
self::buildOrderCondition($joins_order, $orderby_list, array('ufnam'), array('user_pd', 'join_user'));
// area criteria
self::buildAreaCriteria($criteria, $params_list, 'u');
self::buildConditionItem($conditions, $values, $joins, $params_list, 'MultiId', array('go', 'linked_id'), 'oareas', 'oarea');
if (isset($joins['oarea'])) {
$joins['join_outing'] = true;
$joins['post_outing'] = true;
}
// return if no criteria
if (isset($joins['all']) || empty($params_list)) {
$criteria[0] = array_merge($criteria[0], $conditions);
$criteria[1] = array_merge($criteria[1], $values);
$criteria[2] += $joins;
$criteria[3] += $joins_order;
return $criteria;
}
// user criteria
$has_name = User::buildUserListCriteria($criteria, $params_list, true);
self::buildConditionItem($conditions, $values, $joins, $params_list, 'Join', '', 'ijoin', '', 'image');
if ($has_name === 'no_result') {
return $has_name;
}
// outing criteria
$has_name = Outing::buildOutingListCriteria($criteria, $params_list, false, 'linked_id');
if ($has_name === 'no_result') {
return $has_name;
}
// route criteria
$has_name = Route::buildRouteListCriteria($criteria, $params_list, false, 'main_id');
if ($has_name === 'no_result') {
return $has_name;
}
// summit criteria
$has_name = Summit::buildSummitListCriteria($criteria, $params_list, false, 'main_id');
if ($has_name === 'no_result') {
return $has_name;
}
// image criteria
$has_name = Image::buildImageListCriteria($criteria, $params_list, false, 'document_id');
if ($has_name === 'no_result') {
return $has_name;
}
$criteria[0] = array_merge($criteria[0], $conditions);
$criteria[1] = array_merge($criteria[1], $values);
$criteria[2] += $joins;
$criteria[3] += $joins_order;
return $criteria;
}
示例5: buildListCriteria
public static function buildListCriteria($params_list)
{
$criteria = $conditions = $values = $joins = $joins_order = array();
$criteria[0] = array();
// conditions
$criteria[1] = array();
// values
$criteria[2] = array();
// joins
$criteria[3] = array();
// joins for order
// criteria for disabling personal filter
self::buildPersoCriteria($conditions, $values, $joins, $params_list, 'articles');
// orderby criteria
$orderby_list = c2cTools::getRequestParameterArray(array('orderby', 'orderby2', 'orderby3'));
self::buildOrderCondition($joins_order, $orderby_list, array('cnam'), array('article_i18n', 'join_article'));
// area criteria
self::buildAreaCriteria($criteria, $params_list, 'a');
// return if no criteria
if (isset($joins['all']) || empty($params_list)) {
$criteria[0] = array_merge($criteria[0], $conditions);
$criteria[1] = array_merge($criteria[1], $values);
$criteria[2] += $joins;
$criteria[3] += $joins_order;
return $criteria;
}
// article criteria
$has_name = Article::buildArticleListCriteria($criteria, $params_list, true);
if ($has_name === 'no_result') {
return $has_name;
}
// linked document criteria
self::buildConditionItem($conditions, $values, $joins, $params_list, 'List', 'lcd.main_id', 'cdocs', 'cdoc');
// summit criteria
$has_name = Summit::buildSummitListCriteria($criteria, $params_list, false, 'main_id');
if ($has_name === 'no_result') {
return $has_name;
}
// hut criteria
$has_name = Hut::buildHutListCriteria($criteria, $params_list, false, 'main_id');
if ($has_name === 'no_result') {
return $has_name;
}
// parking criteria
$has_name = Parking::buildParkingListCriteria($criteria, $params_list, false, 'main_id');
if ($has_name === 'no_result') {
return $has_name;
}
// route criteria
$has_name = Route::buildRouteListCriteria($criteria, $params_list, false, 'main_id');
if ($has_name === 'no_result') {
return $has_name;
}
// site criteria
$has_name = Site::buildSiteListCriteria($criteria, $params_list, false, 'main_id');
if ($has_name === 'no_result') {
return $has_name;
}
// outing criteria
$has_name = Outing::buildOutingListCriteria($criteria, $params_list, false, 'main_id');
if ($has_name === 'no_result') {
return $has_name;
}
// book criteria
$has_name = Book::buildBookListCriteria($criteria, $params_list, false, 'c', 'main_id');
if ($has_name === 'no_result') {
return $has_name;
}
// image criteria
$has_name = Image::buildImageListCriteria($criteria, $params_list, false);
if ($has_name === 'no_result') {
return $has_name;
}
// user criteria
self::buildConditionItem($conditions, $values, $joins, $params_list, 'MultiId', array('u', 'main_id'), 'users', 'user_id');
$criteria[0] = array_merge($criteria[0], $conditions);
$criteria[1] = array_merge($criteria[1], $values);
$criteria[2] += $joins;
$criteria[3] += $joins_order;
return $criteria;
}