Public Member Functions | |
| __construct () | |
| Constructor. | |
| execute ($p) | |
| Main entrypoint for the special page. | |
Protected Member Functions | |
| extractQueryParameters ($p) | |
| This code rather hacky since there are many ways to call that special page, the most involved of which is the way that this page calls itself when data is submitted via the form (since the shape of the parameters then is governed by the UI structure, as opposed to being governed by reason). | |
| makeHTMLResult () | |
| TODO: document. | |
| getInputForm ($printoutstring, $urltail) | |
| Generates the Search Box UI. | |
| getNavigationBar (SMWQueryResult $res, array $urlArgs) | |
| Build the navigation for some given query result, reuse url-tail parameters. | |
| showFormatOptions ($format, array $paramValues) | |
| Display a form section showing the options for a given format, based on the getParameters() value for that format's query printer. | |
| showFormatOption (Parameter $parameter, $currentValue) | |
| Get the HTML for a single parameter input. | |
Static Protected Member Functions | |
| static | addAutocompletionJavascriptAndCSS () |
| Creates and adds the JavaScript and JS needed for autocompletion to $wgOut. | |
| static | getEmbedToggle () |
| TODO: document. | |
Protected Attributes | |
| $m_querystring = '' | |
| $m_params = array() | |
| $m_printouts = array() | |
| $m_editquery = false | |
Definition at line 18 of file SMW_SpecialAsk.php.
| SMWAskPage::__construct | ( | ) |
| SMWAskPage::execute | ( | $ | p | ) |
Main entrypoint for the special page.
| string | $p |
Definition at line 37 of file SMW_SpecialAsk.php.
References $smwgQEnabled, SMWOutputs::commitToOutputPage(), extractQueryParameters(), makeHTMLResult(), and showFormatOptions().
| SMWAskPage::extractQueryParameters | ( | $ | p | ) | [protected] |
This code rather hacky since there are many ways to call that special page, the most involved of which is the way that this page calls itself when data is submitted via the form (since the shape of the parameters then is governed by the UI structure, as opposed to being governed by reason).
| string | $p |
Definition at line 69 of file SMW_SpecialAsk.php.
References $smwgQMaxInlineLimit, SMWInfolink::decodeParameters(), and SMWQueryProcessor::processFunctionParams().
Referenced by execute().
| static SMWAskPage::addAutocompletionJavascriptAndCSS | ( | ) | [static, protected] |
Creates and adds the JavaScript and JS needed for autocompletion to $wgOut.
Uses the MW API to get suggestions for properties. Test for non-english wikis, add caching on client to improve performance
* extending jquery functions for custom autocomplete matching */
Definition at line 173 of file SMW_SpecialAsk.php.
References $smwgScriptPath, and END.
| SMWAskPage::makeHTMLResult | ( | ) | [protected] |
TODO: document.
Definition at line 286 of file SMW_SpecialAsk.php.
References $smwgAutocompleteInSpecialAsk, END, simplejson::encoder::text, and scraper::url.
Referenced by execute().
| SMWAskPage::getInputForm | ( | $ | printoutstring, | |
| $ | urltail | |||
| ) | [protected] |
Generates the Search Box UI.
| string | $printoutstring | |
| string | $urltail |
Definition at line 491 of file SMW_SpecialAsk.php.
| static SMWAskPage::getEmbedToggle | ( | ) | [static, protected] |
| SMWAskPage::getNavigationBar | ( | SMWQueryResult $ | res, | |
| array $ | urlArgs | |||
| ) | [protected] |
Build the navigation for some given query result, reuse url-tail parameters.
| SMWQueryResult | $res | |
| array | $urlArgs |
Definition at line 646 of file SMW_SpecialAsk.php.
References $smwgQMaxInlineLimit.
| SMWAskPage::showFormatOptions | ( | $ | format, | |
| array $ | paramValues | |||
| ) | [protected] |
Display a form section showing the options for a given format, based on the getParameters() value for that format's query printer.
| string | $format | |
| array | $paramValues The current values for the parameters (name => value) |
Definition at line 736 of file SMW_SpecialAsk.php.
References SMWQueryProcessor::getParameters(), SMWQueryProcessor::getResultPrinter(), and SMWQueryProcessor::SPECIAL_PAGE.
Referenced by execute().
| SMWAskPage::showFormatOption | ( | Parameter $ | parameter, | |
| $ | currentValue | |||
| ) | [protected] |
Get the HTML for a single parameter input.
| Parameter | $parameter | |
| mixed | $currentValue |
Definition at line 808 of file SMW_SpecialAsk.php.
SMWAskPage::$m_querystring = '' [protected] |
Definition at line 20 of file SMW_SpecialAsk.php.
SMWAskPage::$m_params = array() [protected] |
Definition at line 21 of file SMW_SpecialAsk.php.
SMWAskPage::$m_printouts = array() [protected] |
Definition at line 22 of file SMW_SpecialAsk.php.
SMWAskPage::$m_editquery = false [protected] |
Definition at line 23 of file SMW_SpecialAsk.php.
1.5.6