本文整理汇总了PHP中SearchForm::display方法的典型用法代码示例。如果您正苦于以下问题:PHP SearchForm::display方法的具体用法?PHP SearchForm::display怎么用?PHP SearchForm::display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SearchForm
的用法示例。
在下文中一共展示了SearchForm::display方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
function display($header = false)
{
/*//global $app_list_strings;
if($this->subPanel->subpanel_defs->isCollection() && isset($this->subPanel->subpanel_defs->base_collection_list)){
$GLOBALS['app_list_strings']['collection_temp_list'] = $this->getCollectionList($this->subPanel->subpanel_defs->base_collection_list);
}*/
$this->th->ss->assign('subpanel', $this->subPanel->subpanel_id);
return parent::display($header);
}
示例2: display
function display($header = false)
{
/*//global $app_list_strings;
if($this->subPanel->subpanel_defs->isCollection() && isset($this->subPanel->subpanel_defs->base_collection_list)){
$GLOBALS['app_list_strings']['collection_temp_list'] = $this->getCollectionList($this->subPanel->subpanel_defs->base_collection_list);
}*/
$this->th->ss->assign('subpanel', $this->subPanel->subpanel_id);
// Adding the offset to subpanel search field - this has no affect on pagination
if ($this->subPanel->parent_bean->module_dir != '') {
$this->th->ss->assign('subpanelPageOffset', '<input type="hidden" name="' . $this->subPanel->parent_bean->module_dir . '_' . $this->subPanel->subpanel_id . '_CELL_offset" value="0" />');
}
$this->parsedView = 'sps';
return parent::display($header);
}
示例3: editSearch
function editSearch($args)
{
$this->validate();
$rtDao =& DAORegistry::getDAO('RTDAO');
$journal = Request::getJournal();
$versionId = isset($args[0]) ? $args[0] : 0;
$version =& $rtDao->getVersion($versionId, $journal->getId());
$contextId = isset($args[1]) ? $args[1] : 0;
$context =& $rtDao->getContext($contextId);
$searchId = isset($args[2]) ? $args[2] : 0;
$search =& $rtDao->getSearch($searchId);
if (isset($version) && isset($context) && isset($search) && $context->getVersionId() == $version->getVersionId() && $search->getContextId() == $context->getContextId()) {
import('classes.rt.ojs.form.SearchForm');
$this->setupTemplate(true, $version, $context, $search);
$searchForm = new SearchForm($searchId, $contextId, $versionId);
$searchForm->initData();
$searchForm->display();
} else {
Request::redirect(null, null, 'searches', array($versionId, $contextId));
}
}
示例4: editSearch
function editSearch($args)
{
$this->validate();
$rtDao =& DAORegistry::getDAO('RTDAO');
$archiveId = array_shift($args);
$versionId = array_shift($args);
$contextId = array_shift($args);
$searchId = array_shift($args);
$version =& $rtDao->getVersion($versionId, $archiveId);
$context =& $rtDao->getContext($contextId);
$search =& $rtDao->getSearch($searchId);
if (isset($version) && isset($context) && isset($search) && $context->getVersionId() == $version->getVersionId() && $search->getContextId() == $context->getContextId()) {
import('classes.rt.harvester2.form.SearchForm');
$this->setupTemplate(true, $archiveId, $version, $context, $search);
$searchForm = new SearchForm($searchId, $contextId, $versionId, $archiveId);
$searchForm->initData();
$searchForm->display();
} else {
Request::redirect(null, 'searches', array($archiveId, $versionId, $contextId));
}
}
示例5: display
function display()
{
if (!$this->bean->ACLAccess('list')) {
ACLController::displayNoAccess();
return;
}
$module = $GLOBALS['module'];
$metadataFile = null;
$foundViewDefs = false;
if (file_exists('custom/modules/' . $module . '/metadata/listviewdefs.php')) {
$metadataFile = 'custom/modules/' . $module . '/metadata/listviewdefs.php';
$foundViewDefs = true;
} else {
if (file_exists('custom/modules/' . $module . '/metadata/metafiles.php')) {
require_once 'custom/modules/' . $module . '/metadata/metafiles.php';
if (!empty($metafiles[$module]['listviewdefs'])) {
$metadataFile = $metafiles[$module]['listviewdefs'];
$foundViewDefs = true;
}
} elseif (file_exists('modules/' . $module . '/metadata/metafiles.php')) {
require_once 'modules/' . $module . '/metadata/metafiles.php';
if (!empty($metafiles[$module]['listviewdefs'])) {
$metadataFile = $metafiles[$module]['listviewdefs'];
$foundViewDefs = true;
}
}
}
if (!$foundViewDefs && file_exists('modules/' . $module . '/metadata/listviewdefs.php')) {
$metadataFile = 'modules/' . $module . '/metadata/listviewdefs.php';
}
require_once $metadataFile;
$seed = $this->bean;
if (!empty($this->bean->object_name) && isset($_REQUEST[$module . '2_' . strtoupper($this->bean->object_name) . '_offset'])) {
//if you click the pagination button, it will poplate the search criteria here
if (!empty($_REQUEST['current_query_by_page'])) {
//The code support multi browser tabs pagination
$blockVariables = array('mass', 'uid', 'massupdate', 'delete', 'merge', 'selectCount', 'request_data', 'current_query_by_page', $module . '2_' . strtoupper($this->bean->object_name) . '_ORDER_BY');
if (isset($_REQUEST['lvso'])) {
$blockVariables[] = 'lvso';
}
$current_query_by_page = unserialize(base64_decode($_REQUEST['current_query_by_page']));
foreach ($current_query_by_page as $search_key => $search_value) {
if ($search_key != $module . '2_' . strtoupper($this->bean->object_name) . '_offset' && !in_array($search_key, $blockVariables)) {
if (!is_array($search_value)) {
$_REQUEST[$search_key] = $GLOBALS['db']->quoteForEmail($search_value);
} else {
foreach ($search_value as $key => &$val) {
$val = $GLOBALS['db']->quoteForEmail($val);
}
$_REQUEST[$search_key] = $search_value;
}
}
}
}
}
if (!empty($_REQUEST['saved_search_select']) && $_REQUEST['saved_search_select'] != '_none') {
if (empty($_REQUEST['button']) && (empty($_REQUEST['clear_query']) || $_REQUEST['clear_query'] != 'true')) {
$this->saved_search = loadBean('SavedSearch');
$this->saved_search->retrieveSavedSearch($_REQUEST['saved_search_select']);
$this->saved_search->populateRequest();
} elseif (!empty($_REQUEST['button'])) {
// click the search button, after retrieving from saved_search
$_SESSION['LastSavedView'][$_REQUEST['module']] = '';
unset($_REQUEST['saved_search_select']);
unset($_REQUEST['saved_search_select_name']);
}
}
$lv = new ListViewSmarty();
$displayColumns = array();
if (!empty($_REQUEST['displayColumns'])) {
foreach (explode('|', $_REQUEST['displayColumns']) as $num => $col) {
if (!empty($listViewDefs[$module][$col])) {
$displayColumns[$col] = $listViewDefs[$module][$col];
}
}
} else {
foreach ($listViewDefs[$module] as $col => $params) {
if (!empty($params['default']) && $params['default']) {
$displayColumns[$col] = $params;
}
}
}
global $current_user;
if (!is_admin($current_user)) {
$params = array('massupdate' => false);
$lv->export = false;
} else {
$params = array('massupdate' => true, 'export' => true);
}
if (!empty($_REQUEST['orderBy'])) {
$params['orderBy'] = $_REQUEST['orderBy'];
$params['overrideOrder'] = true;
if (!empty($_REQUEST['sortOrder'])) {
$params['sortOrder'] = $_REQUEST['sortOrder'];
}
}
$lv->displayColumns = $displayColumns;
$this->seed = $seed;
$this->module = $module;
$searchForm = null;
//.........这里部分代码省略.........
示例6: display
function display()
{
if (!$this->bean->ACLAccess('list')) {
ACLController::displayNoAccess();
return;
}
$module = $GLOBALS['module'];
$metadataFile = SugarAutoLoader::loadWithMetafiles($module, 'listviewdefs');
require_once $metadataFile;
$this->bean->ACLFilterFieldList($listViewDefs[$module], array("owner_override" => true));
$seed = $this->bean;
if (!empty($this->bean->object_name) && isset($_REQUEST[$module . '2_' . strtoupper($this->bean->object_name) . '_offset'])) {
//if you click the pagination button, it will populate the search criteria here
if (!empty($_REQUEST['current_query_by_page'])) {
//The code support multi browser tabs pagination
$blockVariables = array('mass', 'uid', 'massupdate', 'delete', 'merge', 'selectCount', 'request_data', 'current_query_by_page', $module . '2_' . strtoupper($this->bean->object_name) . '_ORDER_BY');
if (isset($_REQUEST['lvso'])) {
$blockVariables[] = 'lvso';
}
$current_query_by_page = unserialize(base64_decode($_REQUEST['current_query_by_page']));
foreach ($current_query_by_page as $search_key => $search_value) {
if ($search_key != $module . '2_' . strtoupper($this->bean->object_name) . '_offset' && !in_array($search_key, $blockVariables)) {
if (!is_array($search_value)) {
$_REQUEST[$search_key] = $GLOBALS['db']->quote($search_value);
} else {
foreach ($search_value as $key => &$val) {
$val = $GLOBALS['db']->quote($val);
}
$_REQUEST[$search_key] = $search_value;
}
}
}
}
}
if (!empty($_REQUEST['saved_search_select']) && $_REQUEST['saved_search_select'] != '_none') {
if (empty($_REQUEST['button']) && (empty($_REQUEST['clear_query']) || $_REQUEST['clear_query'] != 'true')) {
$this->saved_search = BeanFactory::getBean('SavedSearch');
$this->saved_search->retrieveSavedSearch($_REQUEST['saved_search_select']);
$this->saved_search->populateRequest();
} elseif (!empty($_REQUEST['button'])) {
// click the search button, after retrieving from saved_search
$_SESSION['LastSavedView'][$_REQUEST['module']] = '';
unset($_REQUEST['saved_search_select']);
unset($_REQUEST['saved_search_select_name']);
}
}
$lv = new ListViewSmarty();
$displayColumns = array();
if (!empty($_REQUEST['displayColumns'])) {
foreach (explode('|', $_REQUEST['displayColumns']) as $num => $col) {
if (!empty($listViewDefs[$module][$col])) {
$displayColumns[$col] = $listViewDefs[$module][$col];
}
}
} else {
foreach ($listViewDefs[$module] as $col => $params) {
if (!empty($params['default']) && $params['default']) {
$displayColumns[$col] = $params;
}
}
}
$params = array('massupdate' => true, 'export' => true);
if (!empty($_REQUEST['orderBy'])) {
$params['orderBy'] = $_REQUEST['orderBy'];
$params['overrideOrder'] = true;
if (!empty($_REQUEST['sortOrder'])) {
$params['sortOrder'] = $_REQUEST['sortOrder'];
}
}
$lv->displayColumns = $displayColumns;
$this->seed = $seed;
$this->module = $module;
$searchForm = null;
$storeQuery = new StoreQuery();
if (!isset($_REQUEST['query'])) {
$storeQuery->loadQuery($this->module);
$storeQuery->populateRequest();
} else {
$storeQuery->saveFromRequest($this->module);
}
//search
$view = 'basic_search';
if (!empty($_REQUEST['search_form_view'])) {
$view = $_REQUEST['search_form_view'];
}
$headers = true;
if (!empty($_REQUEST['search_form_only']) && $_REQUEST['search_form_only']) {
$headers = false;
} elseif (!isset($_REQUEST['search_form']) || $_REQUEST['search_form'] != 'false') {
if (isset($_REQUEST['searchFormTab']) && $_REQUEST['searchFormTab'] == 'advanced_search') {
$view = 'advanced_search';
} else {
$view = 'basic_search';
}
}
$use_old_search = true;
if (SugarAutoLoader::existing('modules/' . $this->module . '/SearchForm.html')) {
require_once 'include/SearchForm/SearchForm.php';
$searchForm = new SearchForm($this->module, $this->seed);
} else {
//.........这里部分代码省略.........