cssId) { $cssModel = new CssModel($app['db']); $cssFile = $cssModel->getById($app['settings']->cssId); $vars['customCssFilename'] = $cssFile['filename'] ?? null; } else { $vars['customCssFilename'] = null; } // always check for flash messages and add them if they exist if (Session::hasFlashMessages()){ $flashMessages = Session::getFlashMessages(); $flashView = new FlashView(); $flashSection = $flashView->renderFlashSection($flashMessages); $vars['flashSection'] = $flashSection; } extract($vars, EXTR_SKIP); include $templatePath; } }