Пример #1
0
 /**
  * [get_object_lookup description]
  *
  * @param string $object_type [description]
  * @param string $filter      [description]
  *
  * @return [type] [description]
  *
  * @author Ken Auberry <*****@*****.**>
  */
 public function get_object_lookup($object_type, $filter = '')
 {
     $my_objects = $this->rep->get_selected_objects($this->user_id);
     if (!array_key_exists($object_type, $my_objects)) {
         $my_objects[$object_type] = array();
     }
     $filter = parse_search_term($filter);
     $results = $this->eus->get_object_list($object_type, $filter, $my_objects[$object_type]);
     $this->page_data['results'] = $results;
     $this->page_data['object_type'] = $object_type;
     $this->page_data['filter_text'] = $filter;
     $this->page_data['my_objects'] = $my_objects[$object_type];
     $this->page_data['js'] = '$(function(){ setup_search_checkboxes(); })';
     if (!empty($results)) {
         $this->load->view("object_types/search_results/{$object_type}_results.html", $this->page_data);
     } else {
         $filter_string = implode("' '", $filter);
         echo "<div class='info_message' style='margin-bottom:1.5em;'>No Results Returned for '{$filter_string}'</div>";
     }
 }
Пример #2
0
 /**
  * [test_get_object_list description].
  *
  * @param [type] $object_type [description]
  * @param string $filter      [description]
  *
  * @return [type] [description]
  *
  * @author Ken Auberry <*****@*****.**>
  */
 public function test_get_object_list($object_type, $filter = '')
 {
     $filter = parse_search_term($filter);
     $results = $this->eus->get_object_list($object_type, $filter);
     echo '<pre>';
     var_dump($results);
     echo '</pre>';
 }