26 parent::__construct( $text,
'GadgetDefinition' );
43 return FormatJson::encode( $this->
getAssocArray(),
"\t", FormatJson::UTF8_OK );
58 parent::fillParserOutput( $title, $revId,
$options, $generateHtml,
$output );
60 foreach ( [
'scripts',
'styles' ] as
$type ) {
61 foreach ( $assoc[
'module'][
$type] as $page ) {
62 $title = Title::makeTitleSafe( NS_GADGET, $page );
74 if ( !parent::isValid() ) {
104 parent::getDeletionUpdates( $page, $parserOutput ),
120 parent::getSecondaryDataUpdates( $title, $old, $recursive, $parserOutput ),
wfArrayPlus2d(array $baseArray, array $newValues)
Merges two (possibly) 2 dimensional arrays into the target array ($baseArray).
wfObjectToArray( $objOrArray, $recursive=true)
Recursively converts the parameter (an object) to an array with the same data.
fillParserOutput(Title $title, $revId, ParserOptions $options, $generateHtml, ParserOutput &$output)
Register some links.
getSecondaryDataUpdates(Title $title, Content $old=null, $recursive=true, ParserOutput $parserOutput=null)
beautifyJSON()
Pretty-print JSON.
getDeletionUpdates(WikiPage $page, ParserOutput $parserOutput=null)
getAssocArray()
Get the JSON content as an associative array with all fields filled out, populating defaults as neces...
DataUpdate to run whenever a page in the Gadget definition is deleted.
Class responsible for validating Gadget definition contents.
Represents the content of a JSON content.
getData()
Decodes the JSON string.
Set options of the Parser.
Represents a title within MediaWiki.
Class representing a MediaWiki article and history.
getTitle()
Get the title object of the article.
static configuration should be added through ResourceLoaderGetConfigVars instead can be used to get the real title after the basic globals have been set but before ordinary actions take place $output
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped & $options
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that probably a stub it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output modifiable modifiable after all normalizations have been except for the $wgMaxImageArea check set to true or false to override the $wgMaxImageArea check result gives extension the possibility to transform it themselves $handler
Base interface for content objects.