Пример #1
0
 function buildSearchQuery()
 {
     require_once 'custom/include/SubPanel/SubPanelSearchForm.php';
     $module = 'Meetings';
     $seed = new Meeting();
     $_REQUEST['searchFormTab'] = 'basic_search';
     $searchForm = new SubPanelSearchForm($seed, $module, $this);
     $searchMetaData = $searchForm->retrieveSearchDefs($module);
     $searchForm->setup($searchMetaData['searchdefs'], $searchMetaData['searchFields'], 'SubpanelSearchFormGeneric.tpl', 'basic_search');
     $searchForm->populateFromRequest();
     $where_clauses = $searchForm->generateSearchWhere(true, $seed->module_dir);
     if (count($where_clauses) > 0) {
         $this->search_query = '(' . implode(' ) AND ( ', $where_clauses) . ')';
     }
     $GLOBALS['log']->info("Subpanel Where Clause: {$this->search_query}");
     return print_r($where_clauses, true);
 }
Пример #2
0
 function getSearchForm()
 {
     $thisPanel =& $this->subpanel_defs;
     $subpanel_defs = $thisPanel->_instance_properties;
     require_once 'include/SubPanel/SubPanelSearchForm.php';
     if ($subpanel_defs['type'] == 'collection') {
         $collection = array_shift(array_values($subpanel_defs['collection_list']));
         $module = $collection['module'];
     } else {
         $module = $subpanel_defs['module'];
     }
     $seed = BeanFactory::getBean($module);
     $searchForm = new SubPanelSearchForm($seed, $module, $this);
     $searchMetaData = $searchForm->retrieveSearchDefs($module);
     if ($subpanel_searchMetaData = $this->get_searchdefs($module)) {
         $searchForm->setup($subpanel_searchMetaData, $searchMetaData['searchFields'], 'SubpanelSearchFormGeneric.tpl', 'basic_search');
         if (!empty($this->collections)) {
             $searchForm->searchFields['collection'] = array();
         }
         $searchForm->populateFromRequest();
         return $searchForm->display();
     }
     return '';
 }
Пример #3
0
 function getSearchForm()
 {
     require_once 'include/SubPanel/SubPanelSearchForm.php';
     $module = 'Meetings';
     $seed = new Meeting();
     $searchForm = new SubPanelSearchForm($seed, $module, $this);
     $searchMetaData = $searchForm->retrieveSearchDefs($module);
     if ($subpanel_searchMetaData = $this->get_searchdefs($module)) {
         $searchForm->setup($subpanel_searchMetaData, $searchMetaData['searchFields'], 'SubpanelSearchFormGeneric.tpl', 'basic_search');
         if (!empty($this->collections)) {
             $searchForm->searchFields['collection'] = array();
         }
         $searchForm->populateFromRequest();
         return $searchForm->display();
     }
     return '';
 }