public function getSubTemplate($template, $cache_id, $compile_id, $caching, $cache_lifetime, $data, $parent_scope)
    {
        // already in template cache?
        if ($this->smarty->allow_ambiguous_resources) {
            $_templateId = Smarty_Resource::getUniqueTemplateName($this, $template) . $cache_id . $compile_id;
        } else {
            $_templateId = $this->smarty->joined_template_dir . '#' . $template . $cache_id . $compile_id;
        }

        if (isset($_templateId[150])) {
            $_templateId = sha1($_templateId);
        }
        if (isset($this->smarty->template_objects[$_templateId])) {
            // clone cached template object because of possible recursive call
            $tpl = clone $this->smarty->template_objects[$_templateId];
            $tpl->parent = $this;
            $tpl->caching = $caching;
            $tpl->cache_lifetime = $cache_lifetime;
        } else {
            $tpl = new $this->smarty->template_class($template, $this->smarty, $this, $cache_id, $compile_id, $caching, $cache_lifetime);
        }
        // get variables from calling scope
        if ($parent_scope == Smarty::SCOPE_LOCAL) {
            $tpl->tpl_vars = $this->tpl_vars;
            $tpl->tpl_vars['smarty'] = clone $this->tpl_vars['smarty'];
        } elseif ($parent_scope == Smarty::SCOPE_PARENT) {
            $tpl->tpl_vars = & $this->tpl_vars;
        } elseif ($parent_scope == Smarty::SCOPE_GLOBAL) {
            $tpl->tpl_vars = & Smarty::$global_tpl_vars;
        } elseif (($scope_ptr = $this->getScopePointer($parent_scope)) == null) {
            $tpl->tpl_vars = & $this->tpl_vars;
        } else {
            $tpl->tpl_vars = & $scope_ptr->tpl_vars;
        }
        $tpl->config_vars = $this->config_vars;
        if (!empty($data)) {
            // set up variable values
            foreach ($data as $_key => $_val) {
                $tpl->tpl_vars[$_key] = new Smarty_variable($_val);
            }
        }

		/// dark edit
		\Dark\SmartyView\SmartyEngine::integrateViewComposers($tpl, $template);  
		/// end edit
		
        return $tpl->fetch(null, null, null, null, false, false, true);
    }
public function getSubTemplate($template, $cache_id, $compile_id, $caching, $cache_lifetime, $data, $parent_scope)
    {
        // already in template cache?
        if ($this->smarty->allow_ambiguous_resources) {
            $_templateId = Smarty_Resource::getUniqueTemplateName($this, $template) . $cache_id . $compile_id;
        } else {
            $_templateId = $this->smarty->joined_template_dir . '#' . $template . $cache_id . $compile_id;
        }

        if (isset($_templateId[150])) {
            $_templateId = sha1($_templateId);
        }
        if (isset($this->smarty->template_objects[$_templateId])) {
            // clone cached template object because of possible recursive call
            $tpl = clone $this->smarty->template_objects[$_templateId];
            $tpl->parent = $this;
            $tpl->caching = $caching;
            $tpl->cache_lifetime = $cache_lifetime;
        } else {
            $tpl = new $this->smarty->template_class($template, $this->smarty, $this, $cache_id, $compile_id, $caching, $cache_lifetime);
        }
        // get variables from calling scope
        if ($parent_scope == Smarty::SCOPE_LOCAL) {
            $tpl->tpl_vars = $this->tpl_vars;
            $tpl->tpl_vars['smarty'] = clone $this->tpl_vars['smarty'];
        } elseif ($parent_scope == Smarty::SCOPE_PARENT) {
            $tpl->tpl_vars = & $this->tpl_vars;
        } elseif ($parent_scope == Smarty::SCOPE_GLOBAL) {
            $tpl->tpl_vars = & Smarty::$global_tpl_vars;
        } elseif (($scope_ptr = $this->getScopePointer($parent_scope)) == null) {
            $tpl->tpl_vars = & $this->tpl_vars;
        } else {
            $tpl->tpl_vars = & $scope_ptr->tpl_vars;
        }
        $tpl->config_vars = $this->config_vars;
        if (!empty($data)) {
            // set up variable values
            foreach ($data as $_key => $_val) {
                $tpl->tpl_vars[$_key] = new Smarty_variable($_val);
            }
        }

		/// dark edit
		\Dark\SmartyView\SmartyEngine::integrateViewComposers($tpl, $template);  
		/// end edit
		
        return $tpl->fetch(null, null, null, null, false, false, true);
    }
public function getSubTemplate ( $ template , $ cache_id , $ compile_id , $ caching , $ cache_lifetime , $ data , $ parent_scope ) { // already in template cache? if ( $ this -> smarty -> allow_ambiguous_resources ) { $ _templateId = Smarty_Resource :: getUniqueTemplateName ( $ this , $ template ) . $ cache_id . $ compile_id ; } else { $ _templateId = $ this -> smarty -> joined_template_dir . '#' . $ template . $ cache_id . $ compile_id ; } if ( isset ( $ _templateId [ 150 ] ) ) { $ _templateId = sha1 ( $ _templateId ) ; } if ( isset ( $ this -> smarty -> template_objects [ $ _templateId ] ) ) { // clone cached template object because of possible recursive call $ tpl = clone $ this -> smarty -> template_objects [ $ _templateId ] ; $ tpl -> parent = $ this ; $ tpl -> caching = $ caching ; $ tpl -> cache_lifetime = $ cache_lifetime ; } else { $ tpl = new $ this -> smarty -> template_class ( $ template , $ this -> smarty , $ this , $ cache_id , $ compile_id , $ caching , $ cache_lifetime ) ; } // get variables from calling scope if ( $ parent_scope == Smarty :: SCOPE_LOCAL ) { $ tpl -> tpl_vars = $ this -> tpl_vars ; $ tpl -> tpl_vars [ 'smarty' ] = clone $ this -> tpl_vars [ 'smarty' ] ; } elseif ( $ parent_scope == Smarty :: SCOPE_PARENT ) { $ tpl -> tpl_vars = & $ this -> tpl_vars ; } elseif ( $ parent_scope == Smarty :: SCOPE_GLOBAL ) { $ tpl -> tpl_vars = & Smarty :: $ global_tpl_vars ; } elseif ( ( $ scope_ptr = $ this -> getScopePointer ( $ parent_scope ) ) == null ) { $ tpl -> tpl_vars = & $ this -> tpl_vars ; } else { $ tpl -> tpl_vars = & $ scope_ptr -> tpl_vars ; } $ tpl -> config_vars = $ this -> config_vars ; if ( ! empty ( $ data ) ) { // set up variable values foreach ( $ data as $ _key => $ _val ) { $ tpl -> tpl_vars [ $ _key ] = new Smarty_variable ( $ _val ) ; } } /// dark edit \ Dark \ SmartyView \ SmartyEngine :: integrateViewComposers ( $ tpl , $ template ) ; /// end edit return $ tpl -> fetch ( null , null , null , null , false , false , true ) ; }
Template code runtime function to get subtemplate content

@param string  $template       the resource handle of the template file
@param mixed   $cache_id       cache id to be used with this template
@param mixed   $compile_id     compile id to be used with this template
@param integer $caching        cache mode
@param integer $cache_lifetime life time of cache data
@param         $data
@param int     $parent_scope   scope in which {include} should execute

@returns string template content
Template code runtime function to get subtemplate content