Public Member Functions | |
| __construct ($category, $subcategory, $applied_filters, $remaining_filters, $offset, $limit) | |
| Initialize the variables of this page. | |
| makeBrowseURL ($category, $applied_filters=array(), $subcategory=null) | |
| createTempTable ($category, $subcategory, $subcategories, $applied_filters) | |
| Creates a temporary database table of values that match the current set of filters selected by the user - used for displaying all remaining filters. | |
| getSQLFromClauseForField ($new_filter) | |
| Creates a SQL statement, lacking only the initial "SELECT" clause, to get all the pages that match all the previously- selected filters, plus the one new filter (with value) that was passed in to this function. | |
| getSQLFromClauseForCategory ($subcategory, $child_subcategories) | |
| Very similar to getSQLFromClauseForField(), except that instead of a new filter passed in, it's a subcategory, plus all that subcategory's child subcategories, to ensure completeness. | |
| getSQLFromClause ($category, $subcategory, $subcategories, $applied_filters) | |
| Returns everything from the FROM clause onward for a SQL statement to get all pages that match a certain set of criteria for category, subcategory and filters. | |
| getNumResults ($subcategory, $subcategories, $new_filter=null) | |
| Gets the number of pages matching both the currently-selected set of filters and either a new subcategory or a new filter. | |
| getName () | |
| isExpensive () | |
| isSyndicated () | |
| printCategoriesList ($categories) | |
| printFilterLabel ($filter_name) | |
| printFilterValue ($filter, $value) | |
| Print a "nice" version of the value for a filter, if it's some special case like 'other', 'none', a boolean, etc. | |
| printAppliedFilterLine ($af) | |
| Print the line showing 'OR' values for a filter that already has at least one value set. | |
| printUnappliedFilterValues ($cur_url, $f, $filter_values) | |
| addJavascriptAndCSS () | |
| Adds Javascript and CSS to the page for comboboxes, the long way. | |
| printComboBoxInput ($filter_name, $filter_values, $cur_value=null) | |
| printDateInput ($input_name, $cur_value=null) | |
| printDateRangeInput ($filter_name, $lower_date=null, $upper_date=null) | |
| printUnappliedFilterLine ($f, $cur_url) | |
| Print the line showing 'AND' values for a filter that has not been applied to the drilldown. | |
| getPageHeader () | |
| linkParameters () | |
| Used to set URL for additional pages of results. | |
| getSQL () | |
| getOrder () | |
| getOrderFields () | |
| sortDescending () | |
| formatResult ($skin, $result) | |
| addSemanticResultWrapper ($dbr, $res, $num, $query, $mainlabel, $printouts) | |
| openList ($offset) | |
| closeList () | |
Static Public Member Functions | |
| static | loadJavascriptAndCSS () |
| Uses the ResourceLoader (available with MediaWiki 1.17 and higher) to load all the necessary JS and CSS files for comboboxes. | |
Public Attributes | |
| $category = "" | |
| $subcategory = "" | |
| $next_level_subcategories = array() | |
| $all_subcategories = array() | |
| $applied_filters = array() | |
| $remaining_filters = array() | |
| $show_single_cat = false | |
Protected Member Functions | |
| outputResults ($out, $skin, $dbr, $res, $num, $offset) | |
| Format and output report results using the given information plus OutputPage. | |
Definition at line 157 of file SD_BrowseData.php.
| SDBrowseDataPage::__construct | ( | $ | category, | |
| $ | subcategory, | |||
| $ | applied_filters, | |||
| $ | remaining_filters, | |||
| $ | offset, | |||
| $ | limit | |||
| ) |
Initialize the variables of this page.
Definition at line 169 of file SD_BrowseData.php.
References $applied_filters, $category, $remaining_filters, $subcategory, and SDUtils::getCategoryChildren().
| SDBrowseDataPage::makeBrowseURL | ( | $ | category, | |
| $ | applied_filters = array(), |
|||
| $ | subcategory = null | |||
| ) |
Definition at line 196 of file SD_BrowseData.php.
References $applied_filters, $category, $subcategory, and simplejson::encoder::text.
Referenced by getPageHeader(), printAppliedFilterLine(), and printCategoriesList().
| SDBrowseDataPage::createTempTable | ( | $ | category, | |
| $ | subcategory, | |||
| $ | subcategories, | |||
| $ | applied_filters | |||
| ) |
Creates a temporary database table of values that match the current set of filters selected by the user - used for displaying all remaining filters.
Definition at line 233 of file SD_BrowseData.php.
References $applied_filters, $category, $subcategory, and getSQLFromClause().
| SDBrowseDataPage::getSQLFromClauseForField | ( | $ | new_filter | ) |
Creates a SQL statement, lacking only the initial "SELECT" clause, to get all the pages that match all the previously- selected filters, plus the one new filter (with value) that was passed in to this function.
Definition at line 250 of file SD_BrowseData.php.
Referenced by getNumResults().
| SDBrowseDataPage::getSQLFromClauseForCategory | ( | $ | subcategory, | |
| $ | child_subcategories | |||
| ) |
Very similar to getSQLFromClauseForField(), except that instead of a new filter passed in, it's a subcategory, plus all that subcategory's child subcategories, to ensure completeness.
Definition at line 264 of file SD_BrowseData.php.
References $subcategory.
Referenced by getNumResults().
| SDBrowseDataPage::getSQLFromClause | ( | $ | category, | |
| $ | subcategory, | |||
| $ | subcategories, | |||
| $ | applied_filters | |||
| ) |
Returns everything from the FROM clause onward for a SQL statement to get all pages that match a certain set of criteria for category, subcategory and filters.
Definition at line 289 of file SD_BrowseData.php.
References $applied_filters, $category, $subcategory, and simplejson::encoder::text.
Referenced by createTempTable(), and getSQL().
| SDBrowseDataPage::getNumResults | ( | $ | subcategory, | |
| $ | subcategories, | |||
| $ | new_filter = null | |||
| ) |
Gets the number of pages matching both the currently-selected set of filters and either a new subcategory or a new filter.
Definition at line 384 of file SD_BrowseData.php.
References $subcategory, getSQLFromClauseForCategory(), and getSQLFromClauseForField().
Referenced by printUnappliedFilterLine().
| SDBrowseDataPage::getName | ( | ) |
Definition at line 397 of file SD_BrowseData.php.
| SDBrowseDataPage::isExpensive | ( | ) |
Definition at line 401 of file SD_BrowseData.php.
| SDBrowseDataPage::isSyndicated | ( | ) |
Definition at line 403 of file SD_BrowseData.php.
| SDBrowseDataPage::printCategoriesList | ( | $ | categories | ) |
Definition at line 405 of file SD_BrowseData.php.
References $category, $sdgShowCategoriesAsTabs, END, SDUtils::getCategoryChildren(), and makeBrowseURL().
Referenced by getPageHeader().
| SDBrowseDataPage::printFilterLabel | ( | $ | filter_name | ) |
Definition at line 456 of file SD_BrowseData.php.
References SDUtils::getValuesForProperty().
Referenced by getPageHeader(), printAppliedFilterLine(), and printUnappliedFilterLine().
| SDBrowseDataPage::printFilterValue | ( | $ | filter, | |
| $ | value | |||
| ) |
Print a "nice" version of the value for a filter, if it's some special case like 'other', 'none', a boolean, etc.
Definition at line 470 of file SD_BrowseData.php.
References $filter, and SDUtils::booleanToString().
Referenced by getPageHeader(), printAppliedFilterLine(), and printUnappliedFilterValues().
| SDBrowseDataPage::printAppliedFilterLine | ( | $ | af | ) |
Print the line showing 'OR' values for a filter that already has at least one value set.
Definition at line 489 of file SD_BrowseData.php.
References $applied_filters, $sdgScriptPath, SDFilterValue::create(), END, makeBrowseURL(), printComboBoxInput(), printDateRangeInput(), printFilterLabel(), printFilterValue(), and simplejson::encoder::text.
| SDBrowseDataPage::printUnappliedFilterValues | ( | $ | cur_url, | |
| $ | f, | |||
| $ | filter_values | |||
| ) |
Definition at line 565 of file SD_BrowseData.php.
References $sdgFiltersLargestFontSize, $sdgFiltersSmallestFontSize, and printFilterValue().
Referenced by printUnappliedFilterLine().
| static SDBrowseDataPage::loadJavascriptAndCSS | ( | ) | [static] |
Uses the ResourceLoader (available with MediaWiki 1.17 and higher) to load all the necessary JS and CSS files for comboboxes.
Definition at line 599 of file SD_BrowseData.php.
| SDBrowseDataPage::addJavascriptAndCSS | ( | ) |
Adds Javascript and CSS to the page for comboboxes, the long way.
This method exists for backward compatibiity for MediaWiki 1.16.
Definition at line 608 of file SD_BrowseData.php.
References $sdgScriptPath.
| SDBrowseDataPage::printComboBoxInput | ( | $ | filter_name, | |
| $ | filter_values, | |||
| $ | cur_value = null | |||
| ) |
Definition at line 636 of file SD_BrowseData.php.
References END, and scraper::form.
Referenced by printAppliedFilterLine(), and printUnappliedFilterLine().
| SDBrowseDataPage::printDateInput | ( | $ | input_name, | |
| $ | cur_value = null | |||
| ) |
| SDBrowseDataPage::printDateRangeInput | ( | $ | filter_name, | |
| $ | lower_date = null, |
|||
| $ | upper_date = null | |||
| ) |
Definition at line 728 of file SD_BrowseData.php.
References END, scraper::form, and printDateInput().
Referenced by printAppliedFilterLine(), and printUnappliedFilterLine().
| SDBrowseDataPage::printUnappliedFilterLine | ( | $ | f, | |
| $ | cur_url | |||
| ) |
Print the line showing 'AND' values for a filter that has not been applied to the drilldown.
Definition at line 754 of file SD_BrowseData.php.
References $sdgFiltersLargestFontSize, $sdgFiltersSmallestFontSize, $sdgScriptPath, SDFilterValue::create(), SDAppliedFilter::create(), END, getNumResults(), printComboBoxInput(), printDateRangeInput(), printFilterLabel(), and printUnappliedFilterValues().
| SDBrowseDataPage::getPageHeader | ( | ) |
Definition at line 842 of file SD_BrowseData.php.
References $sdgFiltersLargestFontSize, $sdgFiltersSmallestFontSize, $sdgScriptPath, SDUtils::getCategoriesForBrowsing(), makeBrowseURL(), printCategoriesList(), printFilterLabel(), printFilterValue(), and simplejson::encoder::text.
| SDBrowseDataPage::linkParameters | ( | ) |
Used to set URL for additional pages of results.
Definition at line 985 of file SD_BrowseData.php.
References simplejson::encoder::text.
| SDBrowseDataPage::getSQL | ( | ) |
| SDBrowseDataPage::getOrder | ( | ) |
Definition at line 1028 of file SD_BrowseData.php.
| SDBrowseDataPage::getOrderFields | ( | ) |
Definition at line 1032 of file SD_BrowseData.php.
| SDBrowseDataPage::sortDescending | ( | ) |
Definition at line 1036 of file SD_BrowseData.php.
| SDBrowseDataPage::formatResult | ( | $ | skin, | |
| $ | result | |||
| ) |
Definition at line 1040 of file SD_BrowseData.php.
| SDBrowseDataPage::outputResults | ( | $ | out, | |
| $ | skin, | |||
| $ | dbr, | |||
| $ | res, | |||
| $ | num, | |||
| $ | offset | |||
| ) | [protected] |
Format and output report results using the given information plus OutputPage.
| OutputPage | $out OutputPage to print to | |
| Skin | $skin User skin to use | |
| Database | $dbr Database (read) connection to use | |
| int | $res Result pointer | |
| int | $num Number of available result rows | |
| int | $offset Paging offset |
Definition at line 1056 of file SD_BrowseData.php.
References addSemanticResultWrapper(), SMWQueryProcessor::addThisPrintout(), closeList(), SMWOutputs::commitToOutputPage(), SMWOutputs::commitToParser(), SMWQueryProcessor::createQuery(), SDUtils::getDisplayParamsForCategory(), SMWQueryProcessor::getProcessedParams(), SMWQueryProcessor::getResultPrinter(), SMWQueryProcessor::processFunctionParams(), and SMWQueryProcessor::SPECIAL_PAGE.
| SDBrowseDataPage::addSemanticResultWrapper | ( | $ | dbr, | |
| $ | res, | |||
| $ | num, | |||
| $ | query, | |||
| $ | mainlabel, | |||
| $ | printouts | |||
| ) |
Definition at line 1134 of file SD_BrowseData.php.
References $store, SMWWikiPageValue::makePage(), SMWPrintRequest::PRINT_THIS, and smwfGetStore().
Referenced by outputResults().
| SDBrowseDataPage::openList | ( | $ | offset | ) |
Definition at line 1168 of file SD_BrowseData.php.
| SDBrowseDataPage::closeList | ( | ) |
| SDBrowseDataPage::$category = "" |
Definition at line 158 of file SD_BrowseData.php.
Referenced by __construct(), createTempTable(), getSQLFromClause(), makeBrowseURL(), and printCategoriesList().
| SDBrowseDataPage::$subcategory = "" |
Definition at line 159 of file SD_BrowseData.php.
Referenced by __construct(), createTempTable(), getNumResults(), getSQLFromClause(), getSQLFromClauseForCategory(), and makeBrowseURL().
| SDBrowseDataPage::$next_level_subcategories = array() |
Definition at line 160 of file SD_BrowseData.php.
| SDBrowseDataPage::$all_subcategories = array() |
Definition at line 161 of file SD_BrowseData.php.
| SDBrowseDataPage::$applied_filters = array() |
Definition at line 162 of file SD_BrowseData.php.
Referenced by __construct(), createTempTable(), getSQLFromClause(), makeBrowseURL(), and printAppliedFilterLine().
| SDBrowseDataPage::$remaining_filters = array() |
| SDBrowseDataPage::$show_single_cat = false |
Definition at line 164 of file SD_BrowseData.php.
1.5.6