Revisions: Style action links in old revision notices as links
[mediawiki.git] / includes / parser / ParserOutputStringSets.php
blob367ae673ece34b74bc2f9615e8785b84b82e6f37
1 <?php
3 /**
4 * Registry of flags used with ParserOutput::{get,append}OutputString()
5 * within MediaWiki core.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 * http://www.gnu.org/copyleft/gpl.html
22 * @since 1.41
24 * @file
25 * @ingroup Parser
28 namespace MediaWiki\Parser;
30 /**
31 * Registry of string sets used with ParserOutput::{get,append}OutputString()
32 * within MediaWiki core.
34 * All string sets used should be defined in this class.
36 * @package MediaWiki\Parser
38 class ParserOutputStringSets {
40 // These flags are currently stored as ParserOutput properties
42 /**
43 * @var string ResourceLoader modules to load.
44 * @see \MediaWiki\Output\OutputPage::addModules
45 * @see ParserOutput::addModules
46 * @see ParserOutput::getModules
48 public const MODULE = 'mw-Module';
50 /**
51 * @var string Style-only ResourceLoader modules to load.
52 * @see \MediaWiki\Output\OutputPage::addModuleStyles
53 * @see ParserOutput::addModuleStyles
54 * @see ParserOutput::getModuleStyles
56 public const MODULE_STYLE = 'mw-ModuleStyle';
58 /**
59 * @var string Extra values for the Content-Security-Policy default-src
60 * directive.
61 * @see ParserOutput::addExtraCSPDefaultSrc
62 * @see ParserOutput::getExtraCSPDefaultSrcs
64 public const EXTRA_CSP_DEFAULT_SRC = 'mw-ExtraCSPDefaultSrc';
66 /**
67 * @var string Extra values for the Content-Security-Policy script-src
68 * directive.
69 * @see ParserOutput::addExtraCSPScriptSrc
70 * @see ParserOutput::getExtraCSPScriptSrcs
72 public const EXTRA_CSP_SCRIPT_SRC = 'mw-ExtraCspScriptSrc';
74 /**
75 * @var string Extra values for the Content-Security-Policy style-src
76 * directive.
77 * @see ParserOutput::addExtraCSPStyleSrc
78 * @see ParserOutput::getExtraCSPStyleSrcs
80 public const EXTRA_CSP_STYLE_SRC = 'mw-ExtraCspStyleSrc';
82 public static function cases(): array {
83 return [
84 self::MODULE,
85 self::MODULE_STYLE,
86 self::EXTRA_CSP_DEFAULT_SRC,
87 self::EXTRA_CSP_SCRIPT_SRC,
88 self::EXTRA_CSP_STYLE_SRC,