addJavaScriptModuleInstruction($module); } } /** * Resolve a CSS file position, possibly prefixed with 'EXT:' * * @param string $stylesheetFile Given file, possibly prefixed with EXT: * @return string URL to file */ protected function getRelativePathToStylesheetFile(string $stylesheetFile): string { return (string)PathUtility::getSystemResourceUri($stylesheetFile); } /** * Parse a language file and get a label/value array from it. * * @param string $file EXT:path/to/file * @return array Label/value array */ protected function getLabelsFromLocalizationFile(string $file): array { $languageService = $this->getLanguageService() ?? GeneralUtility::makeInstance(LanguageServiceFactory::class)->create('en'); return $languageService->getLabelsFromResource($file); } protected function getLanguageService(): ?LanguageService { return $GLOBALS['LANG'] ?? null; } }