Classes/Service/HtaccessService.php
protected function renderTemplateToFile(string $templateName, array $variables, string $fileName)
    {
        /** @var StandaloneView $renderer */
        $renderer = GeneralUtility::makeInstance(StandaloneView::class);
        $renderer->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName($templateName));
        $renderer->assignMultiple($variables);
        $content = \trim((string)$renderer->render());
        // Note: Create even empty htaccess files (do not check!!!), so the delete is in sync
        GeneralUtility::writeFile($fileName, $content);
    }
protected function renderTemplateToFile(string $templateName, array $variables, string $fileName)
    {
        /** @var StandaloneView $renderer */
        $renderer = GeneralUtility::makeInstance(StandaloneView::class);
        $renderer->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName($templateName));
        $renderer->assignMultiple($variables);
        $content = \trim((string)$renderer->render());
        // Note: Create even empty htaccess files (do not check!!!), so the delete is in sync
        GeneralUtility::writeFile($fileName, $content);
    }
protected function renderTemplateToFile ( string $ templateName , array $ variables , string $ fileName ) { /** @var StandaloneView $renderer */ $ renderer = GeneralUtility :: makeInstance ( StandaloneView :: class ) ; $ renderer -> setTemplatePathAndFilename ( GeneralUtility :: getFileAbsFileName ( $ templateName ) ) ; $ renderer -> assignMultiple ( $ variables ) ; $ content = \ trim ( ( string ) $ renderer -> render ( ) ) ; // Note: Create even empty htaccess files (do not check!!!), so the delete is in sync GeneralUtility :: writeFile ( $ fileName , $ content ) ; }
Render template to file.

@param string $templateName
@param array  $variables
@param string $fileName
Render template to file .