MediaWiki  master
FallbackSlotRoleHandler.php
Go to the documentation of this file.
1 <?php
24 
26 
37 
38  public function __construct( $role ) {
39  // treat unknown content as plain text
40  parent::__construct( $role, CONTENT_MODEL_TEXT );
41  }
42 
48  public function isAllowedOn( LinkTarget $page ) {
49  return false;
50  }
51 
59  public function isAllowedModel( $model, LinkTarget $page ) {
60  return false;
61  }
62 
63  public function getOutputLayoutHints() {
64  // TODO: should be 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(); // TODO: Change the autogenerated stub
69  }
70 
71 }
const CONTENT_MODEL_TEXT
Definition: Defines.php:218
isAllowedModel( $model, LinkTarget $page)
SlotRoleHandler instances are used to declare the existence and behavior of slot roles.
Created by PhpStorm.
A SlotRoleHandler for providing basic functionality for undefined slot roles.