/** * Overloaded Function From Filter * * Calls the parent function and then adds the new site element to the form. * @param Viewer $viewer the current viewer that's being used * @return void */ function grab_fields($viewer) { parent::grab_fields($viewer); $sites = $this->get_sites_with_available_associations(); $this->add_element('search_site', 'select', array('options' => $sites)); $this->set_display_name('search_site', 'site'); $this->add_element('search_exact_site', 'hidden'); if (!empty($this->page->request['search_site'])) { $this->set_value('search_site', $this->page->request['search_site']); } }