protected function includeJsFile($path)
    {
        $pageRenderer = $this->assetHandlerConnectorManager->getPageRenderer();

        if ($this->environmentService->isEnvironmentInFrontendMode()) {
            $pageRenderer->addJsFooterFile($path);
        } else {
            $pageRenderer->addJsFile($path);
        }
    }
protected function includeJsFile($path)
    {
        $pageRenderer = $this->assetHandlerConnectorManager->getPageRenderer();

        if ($this->environmentService->isEnvironmentInFrontendMode()) {
            $pageRenderer->addJsFooterFile($path);
        } else {
            $pageRenderer->addJsFile($path);
        }
    }
protected function includeJsFile ( $ path ) { $ pageRenderer = $ this -> assetHandlerConnectorManager -> getPageRenderer ( ) ; if ( $ this -> environmentService -> isEnvironmentInFrontendMode ( ) ) { $ pageRenderer -> addJsFooterFile ( $ path ) ; } else { $ pageRenderer -> addJsFile ( $ path ) ; } }
We need an abstraction function because the footer inclusion for assets
does not work in backend. It means we include every JavaScript asset in
the header when the request is in a backend context.

@see https://forge.typo3.org/issues/60213

@param string $path
We need an abstraction function because the footer inclusion for assets does not work in backend . It means we include every JavaScript asset in the header when the request is in a backend context .