title = 'Warning:'; $notification->context = Notification::CONTEXT_WARNING; $notification->flags = null; Notification\Manager::notify('ExampleUI_warningWithClose', $notification); $notification = new Notification('Phasellus tincidunt arcu at justo faucibus, et lacinia est accumsan. '); $notification->title = 'Well done'; $notification->context = Notification::CONTEXT_SUCCESS; $notification->type = Notification::TYPE_TOAST; Notification\Manager::notify('ExampleUI_successToast', $notification); $notification = new Notification('Phasellus tincidunt arcu at justo faucibus, et lacinia est accumsan. '); $notification->raw = true; $notification->context = Notification::CONTEXT_ERROR; Notification\Manager::notify('ExampleUI_error', $notification); $view = new View('@ExampleUI/notifications'); $this->setGeneralVariablesView($view); return $view->render(); } }