Ejemplo n.º 1
0
 public static function before_view_render(View\BeforeRender $event, View $target)
 {
     $target['user'] = $target->controller->user;
     $target['in_admin'] = strpos($target->controller->route->id, 'admin:') === 0;
     $target['alerts'] = ['success' => new Alert(Debug::fetch_messages(\ICanBoogie\LogLevel::SUCCESS), [Alert::CONTEXT => Alert::CONTEXT_SUCCESS]), 'info' => new Alert(Debug::fetch_messages(\ICanBoogie\LogLevel::INFO), [Alert::CONTEXT => Alert::CONTEXT_INFO]), 'error' => new Alert(Debug::fetch_messages(\ICanBoogie\LogLevel::ERROR), [Alert::CONTEXT => 'danger']), 'debug' => new Alert(Debug::fetch_messages(\ICanBoogie\LogLevel::DEBUG), [])];
 }