/** * Constructs a new SMWQueryUIHelper when the query is passed to the UI * from a web form. This constructor should be used to handle form * parameters sent from the UI itself. If your search UI must also handle * "further results" links from a wiki page, consider using * makeForInfoLink(). * * If any errors do occur while parsing parameters, they may be accessed * from hasError() and getErrors(). * * @param string $query * @param array $params of key=>value pairs * @param array $printouts array of '?property' strings * @param boolean $enableValidation * @return SMWQueryUIHelper * */ public static function makeForUI($query, array $params, array $printouts, $enableValidation = false) { $result = new SMWQueryUIHelper(self::SPECIAL_PAGE); $result->setParams($params, $enableValidation); $result->setPrintOuts($printouts, $enableValidation); $result->setQueryString($query, $enableValidation); $result->extractParameters(''); return $result; }
/** * Returns true if this page shows the navigationBar. Overload to change * behavior. * * @return boolean */ protected function usesNavigationBar() { // hide if no results are found return $this->uiCore->getResultCount() != 0; }