MediaWiki master
ReadOnlyError.php
Go to the documentation of this file.
1<?php
7namespace MediaWiki\Exception;
8
10
20
24 public function __construct() {
25 $reason = MediaWikiServices::getInstance()->getReadOnlyMode()->getReason();
26 parent::__construct(
27 'readonly',
28 'readonlytext',
29 $reason ? [ $reason ] : []
30 );
31 }
32}
33
35class_alias( ReadOnlyError::class, 'ReadOnlyError' );
An error page which can definitely be safely rendered using the OutputPage.
Show an error when the wiki is locked/read-only and the user tries to do something that requires writ...
Service locator for MediaWiki core services.
static getInstance()
Returns the global default instance of the top level service locator.