diff options
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/includes/specials/SpecialProperties.php')
-rw-r--r-- | www/wiki/extensions/SemanticMediaWiki/includes/specials/SpecialProperties.php | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/includes/specials/SpecialProperties.php b/www/wiki/extensions/SemanticMediaWiki/includes/specials/SpecialProperties.php new file mode 100644 index 00000000..8a4ab4c6 --- /dev/null +++ b/www/wiki/extensions/SemanticMediaWiki/includes/specials/SpecialProperties.php @@ -0,0 +1,62 @@ +<?php + +namespace SMW; + +use SMWOutputs; + +/** + * Special page (Special:Properties) for MediaWiki shows all + * used properties + * + * + * @license GNU GPL v2+ + * @since 1.9 + * + * @author Markus Krötzsch + * @author Jeroen De Dauw + * @author mwjames + */ + +/** + * This special page for MediaWiki shows all used properties. + * + * @ingroup SpecialPage + */ +class SpecialProperties extends SpecialPage { + + /** + * @see SpecialPage::__construct + * @codeCoverageIgnore + */ + public function __construct() { + parent::__construct( 'Properties' ); + } + + /** + * @see SpecialPage::execute + */ + public function execute( $param ) { + $this->setHeaders(); + $out = $this->getOutput(); + + $out->setPageTitle( $this->msg( 'properties' )->text() ); + + $page = new PropertiesQueryPage( $this->getStore(), $this->getSettings() ); + $page->setContext( $this->getContext() ); + + list( $limit, $offset ) = $this->getLimitOffset(); + $page->doQuery( $offset, $limit, $this->getRequest()->getVal( 'property' ) ); + + // Ensure locally collected output data is pushed to the output! + SMWOutputs::commitToOutputPage( $out ); + + } + + private function getLimitOffset() { + return $this->getRequest()->getLimitOffset(); + } + + protected function getGroupName() { + return 'pages'; + } +} |