Merge "Random link in main menu can be customised"
This commit is contained in:
commit
d2e723daf9
|
@ -142,10 +142,11 @@ final class Definitions {
|
||||||
* @throws MWException
|
* @throws MWException
|
||||||
*/
|
*/
|
||||||
public function insertRandomItem( Group $group ) {
|
public function insertRandomItem( Group $group ) {
|
||||||
|
$page = $this->context->msg( 'randompage-url' )->escaped();
|
||||||
// Random link
|
// Random link
|
||||||
$group->insert( 'random' )
|
$group->insert( 'random' )
|
||||||
->addComponent( $this->context->msg( 'mobile-frontend-random-button' )->escaped(),
|
->addComponent( $this->context->msg( 'mobile-frontend-random-button' )->escaped(),
|
||||||
SpecialPage::getTitleFor( 'Randompage' )->getLocalURL() . '#/random',
|
Title::newFromText( $page )->getLocalURL() . '#/random',
|
||||||
MinervaUI::iconClass( 'random', 'before' ), [
|
MinervaUI::iconClass( 'random', 'before' ), [
|
||||||
'id' => 'randomButton',
|
'id' => 'randomButton',
|
||||||
'data-event-name' => 'random',
|
'data-event-name' => 'random',
|
||||||
|
|
Loading…
Reference in New Issue