public function inlineTemplatesFunction($path)
    {
        $pathinfo = pathinfo($path);
        $templateDir = $this->kernelRootDir.'/../web/'.$pathinfo['dirname'];

        if (!is_readable($templateDir)) {
            return;
        }

        $finder = new Finder();
        $finder->files()->name($pathinfo['filename']);

        $output = '';
        foreach ($finder->in($templateDir) as $file) {
            $output .= $this->getScriptTag($file);
        }

        return trim($output);
    }