Page MenuHomeWickedGov Phorge

ApiQueryCodexIcons.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

ApiQueryCodexIcons.php

<?php
namespace MediaWiki\Api;
use MediaWiki\ResourceLoader\CodexModule;
use Wikimedia\ParamValidator\ParamValidator;
class ApiQueryCodexIcons extends ApiQueryBase {
public function execute() {
$params = $this->extractRequestParams();
$iconNames = $params['names'];
$icons = CodexModule::getIcons( null, $this->getConfig(), $iconNames );
$result = $this->getResult();
$result->addValue( 'query', $this->getModuleName(), $icons );
}
public function getCacheMode( $params ) {
return 'public';
}
/**
* No database interaction, so maxlag check is irrelevant
* @return bool
*/
public function shouldCheckMaxlag() {
return false;
}
public function getAllowedParams() {
return [
'names' => [
ParamValidator::PARAM_TYPE => 'string',
ParamValidator::PARAM_REQUIRED => true,
ParamValidator::PARAM_ISMULTI => true,
]
];
}
protected function getExamplesMessages() {
return [
'action=query&list=codexicons&names=cdxIconInfo|cdxIconTrash' =>
'apihelp-query+codexicons-example',
];
}
public function getHelpUrls() {
return 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:CodexIcons';
}
}

File Metadata

Mime Type
text/x-php
Expires
Oct 4 2026, 14:35 (5 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
4e/56/419ae76a7a704cfcfc52b641fdc7
Default Alt Text
ApiQueryCodexIcons.php (1 KB)

Event Timeline