/** * Dja settings initialization. */ function init_dja() { /** @var $app CWebApplication */ $app = Yii::app(); $settings = array(); if (YII_DEBUG) { $settings['TEMPLATE_DEBUG'] = True; } $template_dirs = array(); /** @var $theme CTheme */ if (($theme = $app->getTheme()) !== null) { // Add theme's views directory if any, $template_dirs[] = $theme->getViewPath(); } // Add app views directory. $template_dirs[] = $app->getViewPath(); $settings['TEMPLATE_DIRS'] = $template_dirs; Dja::setSettings($settings); }