protected function resolveSubTemplateDependencies($function)
    {
        if ($this->debug) {
            echo 'Compiler::' . __FUNCTION__ . "\n";
        }

        $body = $this->templatePlugins[$function]['body'];
        foreach ($this->templatePlugins as $func => $attr) {
            if ($func !== $function && !isset($attr['called']) && strpos($body, Core::NAMESPACE_PLUGINS_FUNCTIONS .
            'Plugin' . Core::toCamelCase($func)) !== false) {
                $this->templatePlugins[$func]['called'] = true;
                $this->resolveSubTemplateDependencies($func);
            }
        }
        $this->templatePlugins[$function]['checked'] = true;
    }