MediaWiki  master
Revision\FallbackSlotRoleHandler Class Reference

A SlotRoleHandler for providing basic functionality for undefined slot roles. More...

Inheritance diagram for Revision\FallbackSlotRoleHandler:
Collaboration diagram for Revision\FallbackSlotRoleHandler:

Public Member Functions

 __construct ( $role)
 
 getOutputLayoutHints ()
 
 isAllowedModel ( $model, LinkTarget $page)
 
 isAllowedOn (LinkTarget $page)
 
- Public Member Functions inherited from Revision\SlotRoleHandler
 __construct ( $role, $contentModel, $layout=[])
 
 getDefaultModel (LinkTarget $page)
 Determines the content model to use per default for this slot on the given page. More...
 
 getNameMessageKey ()
 The message key for the translation of the slot name. More...
 
 getOutputLayoutHints ()
 Layout hints for use while laying out the combined output of all slots, typically by RevisionRenderer. More...
 
 getRole ()
 
 isAllowedModel ( $model, LinkTarget $page)
 Determines whether the given model can be used on this slot on the given page. More...
 
 supportsArticleCount ()
 Whether this slot should be considered when determining whether a page should be counted as an "article" in the site statistics. More...
 

Detailed Description

A SlotRoleHandler for providing basic functionality for undefined slot roles.

This class is intended to be used when encountering slots with a role that used to be defined by an extension, but no longer is backed by hany specific handler, since the extension in question has been uninstalled. It may also be used for pages imported from another wiki.

Since
1.33

Definition at line 36 of file FallbackSlotRoleHandler.php.

Constructor & Destructor Documentation

◆ __construct()

Revision\FallbackSlotRoleHandler::__construct (   $role)

Member Function Documentation

◆ getOutputLayoutHints()

Revision\FallbackSlotRoleHandler::getOutputLayoutHints ( )

Definition at line 63 of file FallbackSlotRoleHandler.php.

◆ isAllowedModel()

Revision\FallbackSlotRoleHandler::isAllowedModel (   $model,
LinkTarget  $page 
)
Parameters
string$model
LinkTarget$page
Returns
bool Always false, to prevent undefined slots from being used for arbitrary content.

Definition at line 59 of file FallbackSlotRoleHandler.php.

◆ isAllowedOn()

Revision\FallbackSlotRoleHandler::isAllowedOn ( LinkTarget  $page)
Parameters
LinkTarget$page
Returns
bool Always false, to prevent undefined slots from being used in new revisions.

Definition at line 48 of file FallbackSlotRoleHandler.php.


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