diff options
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/src/Elastic/Admin/InfoProviderHandler.php')
-rw-r--r-- | www/wiki/extensions/SemanticMediaWiki/src/Elastic/Admin/InfoProviderHandler.php | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/src/Elastic/Admin/InfoProviderHandler.php b/www/wiki/extensions/SemanticMediaWiki/src/Elastic/Admin/InfoProviderHandler.php new file mode 100644 index 00000000..0be22606 --- /dev/null +++ b/www/wiki/extensions/SemanticMediaWiki/src/Elastic/Admin/InfoProviderHandler.php @@ -0,0 +1,82 @@ +<?php + +namespace SMW\Elastic\Admin; + +use SMW\MediaWiki\Specials\Admin\OutputFormatter; +use SMW\MediaWiki\Specials\Admin\TaskHandler; + +/** + * @license GNU GPL v2+ + * @since 3.0 + * + * @author mwjames + */ +abstract class InfoProviderHandler extends TaskHandler { + + /** + * @var OutputFormatter + */ + protected $outputFormatter; + + /** + * @since 3.0 + * + * @param OutputFormatter $outputFormatter + */ + public function __construct( OutputFormatter $outputFormatter ) { + $this->outputFormatter = $outputFormatter; + } + + /** + * @since 3.0 + * + * {@inheritDoc} + */ + public function getSection() { + return self::SECTION_SUPPLEMENT; + } + + /** + * @since 3.0 + * + * {@inheritDoc} + */ + public function hasAction() { + return true; + } + + /** + * @since 3.0 + * + * {@inheritDoc} + */ + public function isTaskFor( $task ) { + return $task === $this->getTask(); + } + + /** + * @since 3.0 + * + * @return string + */ + public function getParentTask() { + return 'elastic'; + } + + /** + * @since 3.0 + * + * @return string + */ + public function getTask() { + return $this->getParentTask() . '/' . $this->getSupplementTask(); + } + + /** + * @since 3.0 + * + * @return string + */ + abstract public function getSupplementTask(); + +} |