Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 5
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
ViewLexemeAction
0.00% covered (danger)
0.00%
0 / 5
0.00% covered (danger)
0.00%
0 / 1
6
0.00% covered (danger)
0.00%
0 / 1
 show
0.00% covered (danger)
0.00%
0 / 5
0.00% covered (danger)
0.00%
0 / 1
6
1<?php
2
3namespace Wikibase\Lexeme\MediaWiki\Actions;
4
5use Wikibase\Lexeme\WikibaseLexemeServices;
6use Wikibase\Repo\Actions\ViewEntityAction;
7
8/**
9 * Handles the view action for Wikibase Lexeme.
10 *
11 * @license GPL-2.0-or-later
12 * @author Amir Sarabadani <ladsgroup@gmail.com>
13 */
14class ViewLexemeAction extends ViewEntityAction {
15
16    public function show() {
17        parent::show();
18
19        if ( !WikibaseLexemeServices::getMobileView() ) { // T324991
20            // Basic styles that should also be loaded if JavaScript is disabled
21            $this->getOutput()->addModuleStyles( 'wikibase.lexeme.styles' );
22            $this->getOutput()->addModules( 'wikibase.lexeme.lexemeview' );
23        }
24
25        $this->getOutput()->addJsConfigVars( 'wbUserSpecifiedLanguages', [] );
26    }
27
28}