public function createJavaScriptLoader(string $locale = null): JavaScriptLoader
	{
		$compilers[] = $this->createJSCompiler($this->files[self::JS][null]);
		if ($locale !== null && isset($this->files[self::JS][$locale])) {
			$compilers[] = $this->createJSCompiler($this->files[self::JS][$locale]);
		}

		return new JavaScriptLoader($this->httpRequest->getUrl()->basePath . $this->outputDir, ...$compilers);
	}
public function createJavaScriptLoader(string $locale = null): JavaScriptLoader
	{
		$compilers[] = $this->createJSCompiler($this->files[self::JS][null]);
		if ($locale !== null && isset($this->files[self::JS][$locale])) {
			$compilers[] = $this->createJSCompiler($this->files[self::JS][$locale]);
		}

		return new JavaScriptLoader($this->httpRequest->getUrl()->basePath . $this->outputDir, ...$compilers);
	}
public function createJavaScriptLoader ( string $ locale = null ) : JavaScriptLoader { $ compilers [ ] = $ this -> createJSCompiler ( $ this -> files [ self :: JS ] [ null ] ) ; if ( $ locale !== null && isset ( $ this -> files [ self :: JS ] [ $ locale ] ) ) { $ compilers [ ] = $ this -> createJSCompiler ( $ this -> files [ self :: JS ] [ $ locale ] ) ; } return new JavaScriptLoader ( $ this -> httpRequest -> getUrl ( ) -> basePath . $ this -> outputDir , ... $ compilers ) ; }
Vytvori komponentu js
@param string $locale
@return JavaScriptLoader
@throws \WebLoader\InvalidArgumentException
Vytvori komponentu js