config = MediaWikiServices::getInstance()->getConfigFactory()->makeConfig( 'textextracts' ); $this->cache = MediaWikiServices::getInstance()->getMainWANObjectCache(); } /** * @throws \ApiUsageException */ public function execute() { $pointConfig = $this->config->get('IsekaiUserPointConfig'); $pointTypes = array_keys($pointConfig); $pointInfos = []; foreach ($pointTypes as $pointType) { $pointInfos[$pointType] = [ 'name' => Utils::getPointName($pointType), 'icon' => Utils::getPointIcon($pointType), ]; } $result = $this->getResult(); $result->addValue( [ 'query', $this->getModuleName() ], 'pointinfo', $pointInfos ); } /** * @param array $params Ignored parameters * @return string */ public function getCacheMode($params) { return 'public'; } public function getAllowedParams() { return [ ]; } }