MediaWiki master
FallbackSlotRoleHandler.php
Go to the documentation of this file.
1<?php
23namespace 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}
const CONTENT_MODEL_UNKNOWN
Definition Defines.php:227
A SlotRoleHandler for providing basic functionality for undefined slot roles.
getOutputLayoutHints()
Layout hints for use while laying out the combined output of all slots, typically by RevisionRenderer...
SlotRoleHandler instances are used to declare the existence and behavior of slot roles.
Represents the target of a wiki link.
Interface for objects (potentially) representing an editable wiki page.