WikibaseLexeme
MediaWiki WikibaseLexeme extension
Loading...
Searching...
No Matches
Wikibase\Lexeme\Presentation\View\LexemeView Class Reference

Class for creating HTML views for Lexeme instances. More...

+ Inheritance diagram for Wikibase\Lexeme\Presentation\View\LexemeView:
+ Collaboration diagram for Wikibase\Lexeme\Presentation\View\LexemeView:

Public Member Functions

 __construct (TemplateFactory $templateFactory, LanguageDirectionalityLookup $languageDirectionalityLookup, $languageCode, FormsView $formsView, SensesView $sensesView, StatementSectionsView $statementSectionsView, LexemeTermFormatter $lemmaFormatter, EntityIdFormatter $idFormatter)
 
 getContent (EntityDocument $entity, $revision=null)
 Builds and returns the main content representing a whole Lexeme.
 

Protected Member Functions

 getSideHtml (EntityDocument $entity)
 

Private Member Functions

 getLexemeHeader (Lexeme $entity)
 
 getLocalizedMessage ( $key, array $params=[])
 
 renderLemmaWidget (Lexeme $lexeme)
 
 renderLanguageAndLexicalCategoryWidget (Lexeme $lexeme)
 

Private Attributes

 $formsView
 
 $sensesView
 
 $statementSectionsView
 
 $idFormatter
 
 $lemmaFormatter
 

Detailed Description

Class for creating HTML views for Lexeme instances.

Author
Amir Sarabadani ladsg.nosp@m.roup.nosp@m.@gmai.nosp@m.l.co.nosp@m.m

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lexeme\Presentation\View\LexemeView::__construct ( TemplateFactory $templateFactory,
LanguageDirectionalityLookup $languageDirectionalityLookup,
$languageCode,
FormsView $formsView,
SensesView $sensesView,
StatementSectionsView $statementSectionsView,
LexemeTermFormatter $lemmaFormatter,
EntityIdFormatter $idFormatter )
Parameters
TemplateFactory$templateFactory
LanguageDirectionalityLookup$languageDirectionalityLookup
string$languageCode
FormsView$formsView
SensesView$sensesView
StatementSectionsView$statementSectionsView
LexemeTermFormatter$lemmaFormatter
EntityIdFormatter$idFormatter

Member Function Documentation

◆ getContent()

Wikibase\Lexeme\Presentation\View\LexemeView::getContent ( EntityDocument $entity,
$revision = null )

Builds and returns the main content representing a whole Lexeme.

Parameters
EntityDocument$entitythe entity to render
int | null$revisionthe revision of the entity to render
Returns
ViewContent

◆ getLexemeHeader()

Wikibase\Lexeme\Presentation\View\LexemeView::getLexemeHeader ( Lexeme $entity)
private
Parameters
Lexeme$entity
Returns
string HTML

◆ getLocalizedMessage()

Wikibase\Lexeme\Presentation\View\LexemeView::getLocalizedMessage ( $key,
array $params = [] )
private
Parameters
string$key
array$params
Returns
string Plain text

◆ getSideHtml()

Wikibase\Lexeme\Presentation\View\LexemeView::getSideHtml ( EntityDocument $entity)
protected
See also
EntityView::getSideHtml
Parameters
EntityDocument$entity
Returns
string HTML

◆ renderLanguageAndLexicalCategoryWidget()

Wikibase\Lexeme\Presentation\View\LexemeView::renderLanguageAndLexicalCategoryWidget ( Lexeme $lexeme)
private
Parameters
Lexeme$lexeme
Returns
string

◆ renderLemmaWidget()

Wikibase\Lexeme\Presentation\View\LexemeView::renderLemmaWidget ( Lexeme $lexeme)
private
Returns
string

Member Data Documentation

◆ $formsView

Wikibase\Lexeme\Presentation\View\LexemeView::$formsView
private

◆ $idFormatter

Wikibase\Lexeme\Presentation\View\LexemeView::$idFormatter
private

◆ $lemmaFormatter

Wikibase\Lexeme\Presentation\View\LexemeView::$lemmaFormatter
private

◆ $sensesView

Wikibase\Lexeme\Presentation\View\LexemeView::$sensesView
private

◆ $statementSectionsView

Wikibase\Lexeme\Presentation\View\LexemeView::$statementSectionsView
private

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