Public Member Functions | |
| __construct () | |
| Constructor. | |
| execute ($query) | |
| Main entry point for Special Pages. | |
Static Public Attributes | |
| static | $incomingvaluescount = 8 |
| int How many incoming values should be asked for | |
| static | $incomingpropertiescount = 21 |
| int How many incoming properties should be asked for | |
Private Member Functions | |
| displayBrowse () | |
| Create and output HTML including the complete factbox, based on the extracted parameters in the execute comment. | |
| displayData (SMWSemanticData $data, $left=true, $incoming=false) | |
| Creates the HTML table displaying the data of one subject. | |
| displayValue (SMWPropertyValue $property, SMWDataValue $dataValue, $incoming) | |
| Displays a value, including all relevant links (browse and search by property). | |
| displayHead () | |
| Displays the subject that is currently being browsed to. | |
| displayCenter () | |
| Creates the HTML for the center bar including the links with further navigation options. | |
| displayBottom ($more) | |
| Creates the HTML for the bottom bar including the links with further navigation options. | |
| linkHere ($text, $out, $in, $offset) | |
| Creates the HTML for a link to this page, with some parameters set. | |
| getInData () | |
| Creates a Semantic Data object with the incoming properties instead of the usual outproperties. | |
| getPropertyLabel (SMWPropertyValue $property, $incoming=false) | |
| Figures out the label of the property to be used. | |
| queryForm () | |
| Creates the query form in order to quickly switch to a specific article. | |
| unbreak ($text) | |
| Replace the last two space characters with unbreakable spaces for beautification. | |
Static Private Member Functions | |
| static | addAutoComplete () |
| Creates the JS needed for adding auto-completion to queryForm(). | |
Private Attributes | |
| $subject = null | |
| SMWDataValue Topic of this page. | |
| $articletext = "" | |
| Text to be set in the query form. | |
| $showoutgoing = true | |
| bool To display outgoing values? | |
| $showincoming = false | |
| bool To display incoming values? | |
| $offset = 0 | |
| int At which incoming property are we currently? | |
Definition at line 18 of file SMW_SpecialBrowse.php.
| SMWSpecialBrowse::__construct | ( | ) |
Constructor.
Definition at line 37 of file SMW_SpecialBrowse.php.
References $incomingpropertiescount, $incomingvaluescount, and $smwgBrowseShowAll.
| SMWSpecialBrowse::execute | ( | $ | query | ) |
Main entry point for Special Pages.
| [in] | $query | string Given by MediaWiki |
Definition at line 51 of file SMW_SpecialBrowse.php.
References $smwgBrowseShowAll, SMWOutputs::commitToOutputPage(), SMWInfolink::decodeParameters(), and displayBrowse().
| SMWSpecialBrowse::displayBrowse | ( | ) | [private] |
Create and output HTML including the complete factbox, based on the extracted parameters in the execute comment.
Definition at line 96 of file SMW_SpecialBrowse.php.
References $smwgBrowseShowInverse, displayBottom(), displayCenter(), displayData(), displayHead(), getInData(), queryForm(), and smwfGetStore().
Referenced by execute().
| SMWSpecialBrowse::displayData | ( | SMWSemanticData $ | data, | |
| $ | left = true, |
|||
| $ | incoming = false | |||
| ) | [private] |
Creates the HTML table displaying the data of one subject.
| [in] | $data | SMWSemanticData The data to be displayed |
| [in] | $left | bool Should properties be displayed on the left side? |
| [in] | $incoming | bool Is this an incoming? Or an outgoing? |
Definition at line 148 of file SMW_SpecialBrowse.php.
References $incomingvaluescount, displayValue(), SMWSemanticData::getProperties(), getPropertyLabel(), SMWSemanticData::getPropertyValues(), SMWDataValueFactory::newDataItemValue(), and smwfGetLinker().
Referenced by displayBrowse().
| SMWSpecialBrowse::displayValue | ( | SMWPropertyValue $ | property, | |
| SMWDataValue $ | dataValue, | |||
| $ | incoming | |||
| ) | [private] |
Displays a value, including all relevant links (browse and search by property).
| [in] | $property | SMWPropertyValue The property this value is linked to the subject with |
| [in] | $value | SMWDataValue The actual value |
| [in] | $incoming | bool If this is an incoming or outgoing link |
Definition at line 241 of file SMW_SpecialBrowse.php.
References SMWDataValue::getInfolinkText(), SMWDataValue::getLongHTMLText(), SMWInfolink::newBrowsingLink(), SMWInfolink::newInversePropertySearchLink(), and smwfGetLinker().
Referenced by displayData().
| SMWSpecialBrowse::displayHead | ( | ) | [private] |
Displays the subject that is currently being browsed to.
Definition at line 262 of file SMW_SpecialBrowse.php.
References smwfGetLinker().
Referenced by displayBrowse().
| SMWSpecialBrowse::displayCenter | ( | ) | [private] |
Creates the HTML for the center bar including the links with further navigation options.
Definition at line 279 of file SMW_SpecialBrowse.php.
References linkHere().
Referenced by displayBrowse().
| SMWSpecialBrowse::displayBottom | ( | $ | more | ) | [private] |
Creates the HTML for the bottom bar including the links with further navigation options.
| [in] | $more | bool Are there more inproperties to be displayed? |
Definition at line 295 of file SMW_SpecialBrowse.php.
References $incomingpropertiescount, $offset, $smwgBrowseShowAll, and linkHere().
Referenced by displayBrowse().
| SMWSpecialBrowse::linkHere | ( | $ | text, | |
| $ | out, | |||
| $ | in, | |||
| $ | offset | |||
| ) | [private] |
Creates the HTML for a link to this page, with some parameters set.
| [in] | $text | string The anchor text for the link |
| [in] | $out | bool Should the linked to page include outgoing properties? |
| [in] | $in | bool Should the linked to page include incoming properties? |
| [in] | $offset | int What is the offset for the incoming properties? |
Definition at line 324 of file SMW_SpecialBrowse.php.
References $offset.
Referenced by displayBottom(), and displayCenter().
| SMWSpecialBrowse::getInData | ( | ) | [private] |
Creates a Semantic Data object with the incoming properties instead of the usual outproperties.
Definition at line 346 of file SMW_SpecialBrowse.php.
References $incomingpropertiescount, $incomingvaluescount, and smwfGetStore().
Referenced by displayBrowse().
| SMWSpecialBrowse::getPropertyLabel | ( | SMWPropertyValue $ | property, | |
| $ | incoming = false | |||
| ) | [private] |
Figures out the label of the property to be used.
For outgoing ones it is just the text, for incoming ones we try to figure out the inverse one if needed, either by looking for an explicitly stated one or by creating a default one.
| [in] | $property | SMWPropertyValue The property of interest |
| [in] | $incoming | bool If it is an incoming property |
Definition at line 386 of file SMW_SpecialBrowse.php.
References $smwgBrowseShowInverse, SMWPropertyValue::getWikiValue(), SMWPropertyValue::makeUserProperty(), smwfGetStore(), and unbreak().
Referenced by displayData().
| SMWSpecialBrowse::queryForm | ( | ) | [private] |
Creates the query form in order to quickly switch to a specific article.
Definition at line 406 of file SMW_SpecialBrowse.php.
Referenced by displayBrowse().
| static SMWSpecialBrowse::addAutoComplete | ( | ) | [static, private] |
Creates the JS needed for adding auto-completion to queryForm().
Uses the MW API to fetch suggestions.
Definition at line 421 of file SMW_SpecialBrowse.php.
References END, SMWOutputs::requireResource(), SMWOutputs::requireScript(), and public::response().
| SMWSpecialBrowse::unbreak | ( | $ | text | ) | [private] |
Replace the last two space characters with unbreakable spaces for beautification.
| [in] | $text | string Text to be transformed. Does not need to have spaces |
Definition at line 449 of file SMW_SpecialBrowse.php.
Referenced by getPropertyLabel().
SMWSpecialBrowse::$incomingvaluescount = 8 [static] |
int How many incoming values should be asked for
Definition at line 20 of file SMW_SpecialBrowse.php.
Referenced by __construct(), displayData(), and getInData().
SMWSpecialBrowse::$incomingpropertiescount = 21 [static] |
int How many incoming properties should be asked for
Definition at line 22 of file SMW_SpecialBrowse.php.
Referenced by __construct(), displayBottom(), and getInData().
SMWSpecialBrowse::$subject = null [private] |
SMWSpecialBrowse::$articletext = "" [private] |
SMWSpecialBrowse::$showoutgoing = true [private] |
SMWSpecialBrowse::$showincoming = false [private] |
SMWSpecialBrowse::$offset = 0 [private] |
int At which incoming property are we currently?
Definition at line 32 of file SMW_SpecialBrowse.php.
Referenced by displayBottom(), and linkHere().
1.5.6