MediaWiki  1.34.0
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 ()
 Layout hints for use while laying out the combined output of all slots, typically by RevisionRenderer. More...
 
 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...
 
 getRole ()
 
 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 ( )

Layout hints for use while laying out the combined output of all slots, typically by RevisionRenderer.

The layout hints are given as an associative array. Well-known keys to use:

  • "display": how the output of this slot should be represented. Supported values:
    • "section": show as a top level section of the region.
    • "none": do not show at all Further values that may be supported in the future include "box" and "banner".
  • "region": in which region of the page the output should be placed. Supported values:
    • "center": the central content area. Further values that may be supported in the future include "top" and "bottom", "left" and "right", "header" and "footer".
  • "placement": placement relative to other content of the same area.
    • "append": place at the end, after any output processed previously. Further values that may be supported in the future include "prepend". A "weight" key may be introduced for more fine grained control.
Returns
array an associative array of hints

Reimplemented from Revision\SlotRoleHandler.

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.

Reimplemented from Revision\SlotRoleHandler.

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: