MediaWiki
REL1_39
FallbackSlotRoleHandler.php
Go to the documentation of this file.
1
<?php
23
namespace
MediaWiki\Revision
;
24
25
use
MediaWiki\Linker\LinkTarget
;
26
use
MediaWiki\Page\PageIdentity
;
27
37
class
FallbackSlotRoleHandler
extends
SlotRoleHandler
{
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
}
CONTENT_MODEL_UNKNOWN
const CONTENT_MODEL_UNKNOWN
Definition
Defines.php:216
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\Revision\FallbackSlotRoleHandler\getOutputLayoutHints
getOutputLayoutHints()
Layout hints for use while laying out the combined output of all slots, typically by RevisionRenderer...
Definition
FallbackSlotRoleHandler.php:63
MediaWiki\Revision\FallbackSlotRoleHandler\isAllowedModel
isAllowedModel( $model, PageIdentity $page)
Definition
FallbackSlotRoleHandler.php:59
MediaWiki\Revision\FallbackSlotRoleHandler\__construct
__construct( $role)
Definition
FallbackSlotRoleHandler.php:39
MediaWiki\Revision\SlotRoleHandler
SlotRoleHandler instances are used to declare the existence and behavior of slot roles.
Definition
SlotRoleHandler.php:37
MediaWiki\Linker\LinkTarget
Definition
LinkTarget.php:26
MediaWiki\Page\PageIdentity
Interface for objects (potentially) representing an editable wiki page.
Definition
PageIdentity.php:64
MediaWiki\Revision
Definition
ArchivedRevisionLookup.php:21
includes
Revision
FallbackSlotRoleHandler.php
Generated on Mon Nov 11 2024 07:23:55 for MediaWiki by
1.10.0