inContentLanguage() ->plain() ); $citationTools = array(); if ( is_array( $citationDefinition ) ) { foreach ( $citationDefinition as $tool ) { if ( !isset( $tool->title ) ) { $tool->title = wfMessage( 'visualeditor-cite-tool-name-' . $tool->name ) ->inLanguage( $context->getLanguage() ) ->text(); } $citationTools[] = $tool; } } return 've.init.platform.addMessages(' . FormatJson::encode( array( 'visualeditor-cite-tool-definition.json' => json_encode( $citationTools ) ), ResourceLoader::inDebugMode() ) . ');'; } public function getDependencies( ResourceLoaderContext $context = null ) { return array( 'ext.visualEditor.base', 'ext.visualEditor.mediawiki', ); } public function getDefinitionSummary( ResourceLoaderContext $context ) { $summary = parent::getDefinitionSummary( $context ); $summary[] = array( 'script' => $this->getScript( $context ), ); return $summary; } }