Merge "Random link in main menu can be customised"

This commit is contained in:
jenkins-bot 2019-07-08 23:43:31 +00:00 committed by Gerrit Code Review
commit d2e723daf9

View file

@ -142,10 +142,11 @@ final class Definitions {
* @throws MWException
*/
public function insertRandomItem( Group $group ) {
$page = $this->context->msg( 'randompage-url' )->escaped();
// Random link
$group->insert( 'random' )
->addComponent( $this->context->msg( 'mobile-frontend-random-button' )->escaped(),
SpecialPage::getTitleFor( 'Randompage' )->getLocalURL() . '#/random',
Title::newFromText( $page )->getLocalURL() . '#/random',
MinervaUI::iconClass( 'random', 'before' ), [
'id' => 'randomButton',
'data-event-name' => 'random',