Exemple #1
0
 public function setPaths(array $templatePaths = array(), $overridePaths = FALSE)
 {
     if (!$overridePaths) {
         $this->templatePaths[] = sgConfiguration::getRootDir() . '/views';
         $enabledPlugins = sgConfiguration::get('settings.enabled_plugins', array());
         foreach ($enabledPlugins as $plugin) {
             if (is_dir(sgConfiguration::getRootDir() . "/plugins/{$plugin}/views")) {
                 $this->templatePaths[] = sgConfiguration::getRootDir() . "/plugins/{$plugin}/views";
             }
         }
         $this->templatePaths[] = dirname(__FILE__) . '/views';
     }
     if (isset($this->twig)) {
         $this->twig->getLoader()->setPaths($this->templatePaths);
     }
 }
Exemple #2
0
<?php

return array('magic_routing' => true, 'debug' => false, 'cache_templates' => false, 'cache_routes' => false, 'cache_autoload' => false, 'cache_dir' => sgConfiguration::getRootDir() . '/cache', 'autoload_exclusions' => array('Twig', '.svn', 'CVS', '.git', dirname(__FILE__) . '/../skeleton', dirname(__FILE__) . '/../config'), 'enabled_plugins' => array('Components'), 'js_settings' => array('base' => sgContext::getRelativeBaseUrl()));