application/libraries/Twig.php
/**
     * Set Template Locations
     *
     * Iterate over all modules and add their paths in
     *
     */
Set Template Locations
Iterate over all modules and add their paths in
Set Template Locations Iterate over all modules and add their paths in
private function _set_template_locations() {
        if (method_exists($this->CI->router, 'fetch_module')) {
            $this->_module = $this->CI->router->fetch_module();
            if ($this->_module) {
                $module_locations = $this->CI->config->item('modules_locations');
                foreach ($module_locations AS $location => $offset) {
                    if (is_dir($offset . $this->_module . '/views')) {
                        $this->_template_directories[] = $offset . $this->_module . '/views';
                    }
                }
            }
        }
        if ($this->_twig_loader) {
            $this->_twig_loader->setPaths($this->_template_directories);
        }
    }
private function _set_template_locations ( ) { if ( method_exists ( $ this -> CI -> router , 'fetch_module' ) ) { $ this -> _module = $ this -> CI -> router -> fetch_module ( ) ; if ( $ this -> _module ) { $ module_locations = $ this -> CI -> config -> item ( 'modules_locations' ) ; foreach ( $ module_locations AS $ location => $ offset ) { if ( is_dir ( $ offset . $ this -> _module . '/views' ) ) { $ this -> _template_directories [ ] = $ offset . $ this -> _module . '/views' ; } } } } if ( $ this -> _twig_loader ) { $ this -> _twig_loader -> setPaths ( $ this -> _template_directories ) ; } }
Set Template Locations
 Iterate over all modules and add their paths in
Set Template Locations Iterate over all modules and add their paths in