Basic svg rendering
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This commit is contained in:
@@ -1,32 +1,60 @@
|
||||
<?php
|
||||
namespace MediaWiki\Extension\AnatImageViewer;
|
||||
|
||||
use Content;
|
||||
use TextContent;
|
||||
|
||||
class AnnotationContent extends TextContent {
|
||||
public const MODEL = 'annotation';
|
||||
|
||||
public function __construct( $modelId = 'annotation' ) {
|
||||
parent::__construct( $modelId );
|
||||
/** @inheritDoc */
|
||||
public function __construct( $text, $model_id = self::MODEL ) {
|
||||
parent::__construct( $text, $model_id );
|
||||
}
|
||||
|
||||
/*
|
||||
public function getTextForSearchIndex() {
|
||||
/**
|
||||
* Determines whether this content can be considered empty.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmpty() {
|
||||
$text = trim( strip_tags( $this->getText() ) );
|
||||
return $text === '';
|
||||
}
|
||||
|
||||
public function getWikitextForTransclusion() {
|
||||
}
|
||||
|
||||
public function getTextForSummary( $maxLength = 250 ) {
|
||||
}
|
||||
|
||||
public function getSize() {
|
||||
}
|
||||
|
||||
public function copy() {
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Determines whether this content should be counted as a "page" for the wiki's statistics.
|
||||
*
|
||||
* @param bool|null $hasLinks
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isCountable( $hasLinks = null ) {
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
public function isValid() {
|
||||
return parent::isValid();
|
||||
}
|
||||
|
||||
/**
|
||||
* Should return text relevant to the wiki's search index.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTextForSearchIndex() {
|
||||
return strip_tags( $this->getText() );
|
||||
}
|
||||
|
||||
public function convert( $toModel, $lossy = '' ) {
|
||||
return parent::convert( $toModel, $lossy );
|
||||
}
|
||||
|
||||
public function getSection( $sectionId ) {
|
||||
return parent::getSection( $sectionId );
|
||||
}
|
||||
|
||||
public function replaceSection( $sectionId, Content $with, $sectionTitle = '' ) {
|
||||
return parent::replaceSection( $sectionId, $with, $sectionTitle );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user