本文整理汇总了PHP中StoreQuery::saveFromGet方法的典型用法代码示例。如果您正苦于以下问题:PHP StoreQuery::saveFromGet方法的具体用法?PHP StoreQuery::saveFromGet怎么用?PHP StoreQuery::saveFromGet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StoreQuery
的用法示例。
在下文中一共展示了StoreQuery::saveFromGet方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: StoreQuery
echo $searchForm->displaySavedViews($listViewDefs, $lv, false);
break;
}
return;
}
// use the stored query if there is one
if (!isset($where)) {
$where = "";
}
require_once 'modules/MySettings/StoreQuery.php';
$storeQuery = new StoreQuery();
if (!isset($_REQUEST['query'])) {
$storeQuery->loadQuery($currentModule);
$storeQuery->populateRequest();
} else {
$storeQuery->saveFromGet($currentModule);
}
if (isset($_REQUEST['query'])) {
// we have a query
// first save columns
$current_user->setPreference('ListViewDisplayColumns', $displayColumns, 0, $currentModule);
$searchForm->populateFromRequest();
// gathers search field inputs from $_REQUEST
$where_clauses = $searchForm->generateSearchWhere(true, "Products");
// builds the where clause from search field inputs
if (count($where_clauses) > 0) {
$where = implode(' and ', $where_clauses);
}
$GLOBALS['log']->info("Here is the where clause for the list view: {$where}");
}
// start display
示例2: get_admin_fts_list
function get_admin_fts_list($where, $isMultiSelect = false)
{
global $app_strings, $app_list_strings, $current_language, $sugar_version, $sugar_config, $current_user;
global $urlPrefix, $currentModule, $theme;
$current_module_strings = return_module_language($current_language, 'KBDocuments');
// focus_list is the means of passing data to a ListView.
global $focus_list;
require_once 'include/ListView/ListViewSmarty.php';
require_once SugarAutoLoader::loadWithMetafiles('KBDocuments', 'listviewdefs');
require_once 'modules/KBDocuments/KBListViewData.php';
global $app_strings;
global $app_list_strings;
global $current_language;
$current_module_strings = return_module_language($current_language, 'KBDocuments');
global $urlPrefix;
global $currentModule;
global $theme;
global $current_user;
// focus_list is the means of passing data to a ListView.
global $focus_list;
// setup quicksearch
//require_once('include/QuickSearchDefaults.php');
//$qsd = new QuickSearchDefaults();
// clear the display columns back to default when clear query is called
if (!empty($_REQUEST['clear_query']) && $_REQUEST['clear_query'] == 'true') {
$current_user->setPreference('ListViewDisplayColumns', array(), 0, $currentModule);
}
$savedDisplayColumns = $current_user->getPreference('ListViewDisplayColumns', $currentModule);
// get user defined display columns
$json = getJSONobj();
$seedCase = BeanFactory::getBean('KBDocuments');
// seed bean
// setup listview smarty
$lv = new ListViewSmarty();
$lv->lvd = new KBListViewData();
$lv->export = false;
$lv->select = false;
$lv->delete = false;
$_REQUEST['action'] = 'index';
$displayColumns = array();
// check $_REQUEST if new display columns from post
if (!empty($_REQUEST['displayColumns'])) {
foreach (explode('|', $_REQUEST['displayColumns']) as $num => $col) {
if (!empty($listViewDefs['KBDocuments'][$col])) {
$displayColumns[$col] = $listViewDefs['KBDocuments'][$col];
}
}
} elseif (!empty($savedDisplayColumns)) {
// use user defined display columns from preferences
$displayColumns = $savedDisplayColumns;
} else {
// use columns defined in listviewdefs for default display columns
foreach ($listViewDefs['KBDocuments'] as $col => $params) {
if (!empty($params['default']) && $params['default']) {
$displayColumns[$col] = $params;
}
}
}
$params = array('massupdate' => true);
// setup ListViewSmarty params
if (!empty($_REQUEST['orderBy'])) {
// order by coming from $_REQUEST
$params['orderBy'] = $_REQUEST['orderBy'];
$params['overrideOrder'] = true;
if (!empty($_REQUEST['sortOrder'])) {
$params['sortOrder'] = $_REQUEST['sortOrder'];
}
}
//make sure the column names (array keys) are in upper case
$displayColumns = array_change_key_case($displayColumns, CASE_UPPER);
$lv->displayColumns = $displayColumns;
// use the stored query if there is one
if (!isset($where)) {
$where = "";
}
require_once 'modules/MySettings/StoreQuery.php';
$storeQuery = new StoreQuery();
if (!isset($_REQUEST['query'])) {
$storeQuery->loadQuery($currentModule);
$storeQuery->populateRequest();
} else {
$storeQuery->saveFromGet($currentModule);
}
if (isset($_REQUEST['query'])) {
// we have a query
// first save columns
$current_user->setPreference('ListViewDisplayColumns', $displayColumns, 0, $currentModule);
if (!empty($_SERVER['HTTP_REFERER']) && preg_match('/action=EditView/', $_SERVER['HTTP_REFERER'])) {
// from EditView cancel
$searchForm->populateFromArray($storeQuery->query);
} else {
$searchForm->populateFromRequest();
}
$where_clauses = $searchForm->generateSearchWhere(true, "kbdocuments");
// builds the where clause from search field inputs
if (count($where_clauses) > 0) {
$where = implode(' and ', $where_clauses);
}
$GLOBALS['log']->info("Here is the where clause for the list view: {$where}");
}
//.........这里部分代码省略.........
示例3: array
$whereClauses = array();
$error = '';
///////////////////////////////////////////////////////////////////////////////
////
//// SEARCH FORM FUNCTIONALITY
//// SEARCH QUERY GENERATION
$storeQuery = new StoreQuery();
if (!isset($_REQUEST['query'])) {
//_pp('loading: '.$currentModule.'Group');
//_pp($current_user->user_preferences[$currentModule.'GroupQ']);
$storeQuery->loadQuery($currentModule . 'Group');
$storeQuery->populateRequest();
} else {
//_pp($current_user->user_preferences[$currentModule.'GroupQ']);
//_pp('saving: '.$currentModule.'Group');
$storeQuery->saveFromGet($currentModule . 'Group');
}
if (isset($_REQUEST['query'])) {
// we have a query
if (isset($_REQUEST['email_type'])) {
$email_type = $_REQUEST['email_type'];
}
if (isset($_REQUEST['assigned_to'])) {
$assigned_to = $_REQUEST['assigned_to'];
}
if (isset($_REQUEST['status'])) {
$status = $_REQUEST['status'];
}
if (isset($_REQUEST['name'])) {
$name = $_REQUEST['name'];
}
示例4: StoreQuery
$params['sortOrder'] = $_REQUEST['sortOrder'];
}
}
$params['orderBy'] = '';
$lv->displayColumns = $displayColumns;
// use the stored query if there is one
if (!isset($where)) {
$where = "";
}
require_once 'modules/MySettings/StoreQuery.php';
$storeQuery = new StoreQuery();
if (!isset($_REQUEST['query'])) {
$storeQuery->loadQuery('Calendar');
$storeQuery->populateRequest();
} else {
$storeQuery->saveFromGet('Calendar');
}
global $timedate;
//jc: bug 14616 - dates need to specificy the end of the current date in order to get tasks
// that are scheduled to start today
$today = $timedate->to_db_date(date($timedate->get_date_format() . " H:m:s"), false) . " 23:59:59";
$today = $timedate->handle_offset($today, $timedate->dbDayFormat, true) . " 23:59:59";
//end bug 14616
$where = "(tasks.assigned_user_id='{$current_user->id}' and tasks.status<>'Completed' and tasks.status<>'Deferred'";
$where .= "and (tasks.date_start is NULL or tasks.date_start <= '{$today}'))";
$lv->export = false;
$lv->delete = false;
$lv->select = false;
$lv->mailMerge = false;
$lv->multiSelect = false;
$lv->setup($seedTask, 'include/ListView/ListViewGeneric.tpl', $where, $params);