MediaWiki  master
FallbackSlotRoleHandler.php
Go to the documentation of this file.
1 <?php
23 namespace MediaWiki\Revision;
24 
27 
38 
39  public function __construct( $role ) {
40  parent::__construct( $role, CONTENT_MODEL_UNKNOWN );
41  }
42 
48  public function isAllowedOn( LinkTarget $page ) {
49  return false;
50  }
51 
59  public function isAllowedModel( $model, PageIdentity $page ) {
60  return false;
61  }
62 
63  public function getOutputLayoutHints() {
64  // TODO: should we return [ 'display' => 'none'] here, causing undefined slots
65  // to be hidden? We'd still need some place to surface the content of such
66  // slots, see T209923.
67 
68  return parent::getOutputLayoutHints();
69  }
70 
71 }
Page\PageIdentity
Interface for objects (potentially) representing an editable wiki page.
Definition: PageIdentity.php:64
MediaWiki\Revision\FallbackSlotRoleHandler\isAllowedModel
isAllowedModel( $model, PageIdentity $page)
Definition: FallbackSlotRoleHandler.php:59
MediaWiki\Revision\SlotRoleHandler
SlotRoleHandler instances are used to declare the existence and behavior of slot roles.
Definition: SlotRoleHandler.php:37
MediaWiki\Revision
Definition: ArchivedRevisionLookup.php:21
MediaWiki\Revision\FallbackSlotRoleHandler\__construct
__construct( $role)
Definition: FallbackSlotRoleHandler.php:39
MediaWiki\Revision\SlotRoleHandler\$role
string $role
Definition: SlotRoleHandler.php:42
MediaWiki\Revision\FallbackSlotRoleHandler\getOutputLayoutHints
getOutputLayoutHints()
Layout hints for use while laying out the combined output of all slots, typically by RevisionRenderer...
Definition: FallbackSlotRoleHandler.php:63
CONTENT_MODEL_UNKNOWN
const CONTENT_MODEL_UNKNOWN
Definition: Defines.php:213
MediaWiki\Revision\FallbackSlotRoleHandler
A SlotRoleHandler for providing basic functionality for undefined slot roles.
Definition: FallbackSlotRoleHandler.php:37
MediaWiki\Revision\FallbackSlotRoleHandler\isAllowedOn
isAllowedOn(LinkTarget $page)
Definition: FallbackSlotRoleHandler.php:48
MediaWiki\Linker\LinkTarget
Definition: LinkTarget.php:26