SDUtils Class Reference

A class for static helper functions for Semantic Drilldown. More...

List of all members.

Static Public Member Functions

static getSMWPropertyValues (SMWStore $store, $pageName, $pageNamespace, $propID, $requestOptions=null)
 Helper function to handle getPropertyValues() in both SMW 1.6 and earlier versions.
static getTopLevelCategories ()
 Gets a list of the names of all categories in the wiki that aren't children of some other category - this list additionally includes, and excludes, categories that are manually set with 'SHOWINDRILLDOWN' and 'HIDEFROMDRILLDOWN', respectively.
static getOnlyExplicitlyShownCategories ()
 Gets the list of names of only those categories in the wiki that have a __SHOWINDRILLDOWN__ declaration on their page.
static getCategoriesForBrowsing ()
 Returns the list of categories that will show up in the header/sidebar of the 'BrowseData' special page.
static getSemanticProperties ()
 Gets a list of the names of all properties in the wiki.
static getFilters ()
 Gets the names of all the filter pages, i.e.
static getValuesForProperty ($subject, $subject_namespace, $special_prop)
 Generic static function - gets all the values that a specific page points to with a specific property.
static loadFiltersForCategory ($category)
 Gets all the filters specified for a category.
static getDisplayParamsForCategory ($category)
 Gets all the display parameters defined for a category.
static getCategoryChildren ($category_name, $get_categories, $levels)
static monthToString ($month)
static stringToMonth ($str)
static booleanToString ($bool_value)
static printRedirectForm ($title, $page_contents, $edit_summary, $is_save, $is_preview, $is_diff, $is_minor_edit, $watch_this)
 Prints the mini-form contained at the bottom of various pages, that allows pages to spoof a normal edit page, that can preview, save, etc.
static addMagicWordVariableIDs (&$magicWordVariableIDs)
 Register magic-word variable IDs.
static handleShowAndHide (&$parser, &$text)
 Set values in the page_props table based on the presence of the 'HIDEFROMDRILLDOWN' and 'SHOWINDRILLDOWN' magic words in a page.
static addToAdminLinks (&$admin_links_tree)


Detailed Description

A class for static helper functions for Semantic Drilldown.

Author:
Yaron Koren

Definition at line 8 of file SD_Utils.php.


Member Function Documentation

static SDUtils::getSMWPropertyValues ( SMWStore store,
pageName,
pageNamespace,
propID,
requestOptions = null 
) [static]

Helper function to handle getPropertyValues() in both SMW 1.6 and earlier versions.

Parameters:
SMWStore $store
string $pageName
integer $pageNamespace
string $propID
null|SMWRequestOptions $requestOptions
Returns:
array of SMWDataItem

Definition at line 21 of file SD_Utils.php.

References SMWStore::getPropertyValues(), and SMWPropertyValue::makeProperty().

static SDUtils::getTopLevelCategories (  )  [static]

Gets a list of the names of all categories in the wiki that aren't children of some other category - this list additionally includes, and excludes, categories that are manually set with 'SHOWINDRILLDOWN' and 'HIDEFROMDRILLDOWN', respectively.

Definition at line 41 of file SD_Utils.php.

Referenced by SDPageSchemas::getFieldEditingHTML().

static SDUtils::getOnlyExplicitlyShownCategories (  )  [static]

Gets the list of names of only those categories in the wiki that have a __SHOWINDRILLDOWN__ declaration on their page.

Definition at line 84 of file SD_Utils.php.

static SDUtils::getCategoriesForBrowsing (  )  [static]

Returns the list of categories that will show up in the header/sidebar of the 'BrowseData' special page.

Definition at line 113 of file SD_Utils.php.

References $sdgHideCategoriesByDefault.

Referenced by SDCreateFilter::execute(), SDBrowseData::execute(), and SDBrowseDataPage::getPageHeader().

static SDUtils::getSemanticProperties (  )  [static]

Gets a list of the names of all properties in the wiki.

Definition at line 126 of file SD_Utils.php.

References smwfGetStore().

Referenced by SDCreateFilter::execute().

static SDUtils::getFilters (  )  [static]

Gets the names of all the filter pages, i.e.

pages in the Filter namespace

Definition at line 178 of file SD_Utils.php.

Referenced by SDCreateFilter::execute().

static SDUtils::getValuesForProperty ( subject,
subject_namespace,
special_prop 
) [static]

Generic static function - gets all the values that a specific page points to with a specific property.

Definition at line 193 of file SD_Utils.php.

References $store, and smwfGetStore().

Referenced by SDBrowseData::execute(), getDisplayParamsForCategory(), SDFilter::load(), loadFiltersForCategory(), and SDBrowseDataPage::printFilterLabel().

static SDUtils::loadFiltersForCategory ( category  )  [static]

Gets all the filters specified for a category.

Definition at line 216 of file SD_Utils.php.

References getValuesForProperty(), SDFilter::load(), and SDFilter::loadAllFromPageSchema().

Referenced by SDBrowseData::execute().

static SDUtils::getDisplayParamsForCategory ( category  )  [static]

Gets all the display parameters defined for a category.

Definition at line 239 of file SD_Utils.php.

References getValuesForProperty().

Referenced by SDBrowseDataPage::outputResults().

static SDUtils::getCategoryChildren ( category_name,
get_categories,
levels 
) [static]

static SDUtils::monthToString ( month  )  [static]

static SDUtils::stringToMonth ( str  )  [static]

Definition at line 314 of file SD_Utils.php.

Referenced by SDFilterValue::create().

static SDUtils::booleanToString ( bool_value  )  [static]

Definition at line 342 of file SD_Utils.php.

Referenced by SDBrowseDataPage::printFilterValue().

static SDUtils::printRedirectForm ( title,
page_contents,
edit_summary,
is_save,
is_preview,
is_diff,
is_minor_edit,
watch_this 
) [static]

Prints the mini-form contained at the bottom of various pages, that allows pages to spoof a normal edit page, that can preview, save, etc.

Definition at line 364 of file SD_Utils.php.

References public::action, END, and scraper::form.

Referenced by SDCreateFilter::execute().

static SDUtils::addMagicWordVariableIDs ( &$  magicWordVariableIDs  )  [static]

Register magic-word variable IDs.

Definition at line 409 of file SD_Utils.php.

static SDUtils::handleShowAndHide ( &$  parser,
&$  text 
) [static]

Set values in the page_props table based on the presence of the 'HIDEFROMDRILLDOWN' and 'SHOWINDRILLDOWN' magic words in a page.

Definition at line 419 of file SD_Utils.php.

static SDUtils::addToAdminLinks ( &$  admin_links_tree  )  [static]

Definition at line 432 of file SD_Utils.php.


The documentation for this class was generated from the following file:

Generated on Sun Mar 18 07:15:42 2012 for Semantic MediaWiki by  doxygen 1.5.6