MediaWiki master
ReadOnlyError.php
Go to the documentation of this file.
1<?php
21namespace MediaWiki\Exception;
22
24
34
38 public function __construct() {
39 $reason = MediaWikiServices::getInstance()->getReadOnlyMode()->getReason();
40 parent::__construct(
41 'readonly',
42 'readonlytext',
43 $reason ? [ $reason ] : []
44 );
45 }
46}
47
49class_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.