Wikibase
MediaWiki Wikibase extension
Wikibase\Repo\Actions\ViewEntityAction Class Reference

Handles the view action for Wikibase entities. More...

+ Inheritance diagram for Wikibase\Repo\Actions\ViewEntityAction:
+ Collaboration diagram for Wikibase\Repo\Actions\ViewEntityAction:

Public Member Functions

 show ()
 
 requiresUnblock ()
 
 requiresWrite ()
 

Static Public Member Functions

static onBeforeDisplayNoArticleText (Article $article)
 Handler for the BeforeDisplayNoArticleText called by Article. More...
 

Protected Member Functions

 getDescription ()
 

Private Member Functions

 isEditable ()
 
 isDiff ()
 
 showEntityPage ()
 
 constructLinkAlternateHeader (string $url, string $type)
 Create an alternate link header for the given URI and MIME type, with no extra information. More...
 
 addLinkHeaders (OutputPage $outputPage)
 Add alternate links to the HTTP response. More...
 
 overridePageMetaTags (OutputPage $outputPage)
 This will be the label, if available, or else the entity id (e.g. More...
 
 setDiffPageTitle (OutputPage $outputPage, $titleText)
 
 setHTMLTitle (OutputPage $outputPage, $titleText)
 

Detailed Description

Handles the view action for Wikibase entities.

Author
Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >
Daniel Kinzler < danie.nosp@m.l.ki.nosp@m.nzler.nosp@m.@wik.nosp@m.imedi.nosp@m.a.de >

Member Function Documentation

◆ addLinkHeaders()

Wikibase\Repo\Actions\ViewEntityAction::addLinkHeaders ( OutputPage  $outputPage)
private

Add alternate links to the HTTP response.

Parameters
OutputPage$outputPage

◆ constructLinkAlternateHeader()

Wikibase\Repo\Actions\ViewEntityAction::constructLinkAlternateHeader ( string  $url,
string  $type 
)
private

Create an alternate link header for the given URI and MIME type, with no extra information.

Parameters
string$urlthe URL of the relation
string$typethe MIME type for the link header entry
Returns
string relation

◆ getDescription()

Wikibase\Repo\Actions\ViewEntityAction::getDescription ( )
protected
See also
Action::getDescription
Returns
string Empty.

◆ isDiff()

Wikibase\Repo\Actions\ViewEntityAction::isDiff ( )
private
Returns
bool

◆ isEditable()

Wikibase\Repo\Actions\ViewEntityAction::isEditable ( )
private
Returns
bool False for older revisions, or if this is for sure not a plain view (e.g. diff or print view).

◆ onBeforeDisplayNoArticleText()

static Wikibase\Repo\Actions\ViewEntityAction::onBeforeDisplayNoArticleText ( Article  $article)
static

Handler for the BeforeDisplayNoArticleText called by Article.

We implement this solely to replace the standard message that is shown when an entity does not exists.

Parameters
Article$article
Returns
bool
Exceptions
MWException

◆ overridePageMetaTags()

Wikibase\Repo\Actions\ViewEntityAction::overridePageMetaTags ( OutputPage  $outputPage)
private

This will be the label, if available, or else the entity id (e.g.

'Q42'). This is passed via parser output and output page to save overhead on view actions.

Parameters
OutputPage$outputPage

◆ requiresUnblock()

Wikibase\Repo\Actions\ViewEntityAction::requiresUnblock ( )
See also
Action::requiresUnblock
Returns
bool Always false, but overridden by some subclasses.

Reimplemented in Wikibase\Repo\Actions\EditEntityAction.

◆ requiresWrite()

Wikibase\Repo\Actions\ViewEntityAction::requiresWrite ( )
See also
Action::requiresWrite
Returns
bool Always false, but overridden by some subclasses.

Reimplemented in Wikibase\Repo\Actions\EditEntityAction.

◆ setDiffPageTitle()

Wikibase\Repo\Actions\ViewEntityAction::setDiffPageTitle ( OutputPage  $outputPage,
  $titleText 
)
private
Parameters
OutputPage$outputPage
string$titleText

◆ setHTMLTitle()

Wikibase\Repo\Actions\ViewEntityAction::setHTMLTitle ( OutputPage  $outputPage,
  $titleText 
)
private
Parameters
OutputPage$outputPage
string$titleText

◆ show()

Wikibase\Repo\Actions\ViewEntityAction::show ( )
See also
ViewAction::show

Parent is doing $this->checkCanExecute( $this->getUser() )

Reimplemented in Wikibase\Repo\Actions\SubmitEntityAction, and Wikibase\Repo\Actions\EditEntityAction.

◆ showEntityPage()

Wikibase\Repo\Actions\ViewEntityAction::showEntityPage ( )
private

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