private function RenderMsg() { // Get exception messages if there are any. if (\model\ExceptionsService::HasExceptions()) { echo $this->LoadTemplate('MessageTpl', [\model\ExceptionsService::GetLastExceptionMessage()]); } else { if (\model\FlashMessageService::DoesExist()) { echo $this->LoadTemplate('MessageTpl', \model\FlashMessageService::GetAll()); } } }
public function GetHTML() { $messageToUser = ''; // Get exception messages if there are any. if (\model\ExceptionsService::HasExceptions()) { $messageToUser = \model\ExceptionsService::GetLastExceptionMessage(); } else { if (!\model\ValidationService::IsValid()) { foreach (\model\ValidationService::GetValidationErrors() as $message) { $messageToUser .= $message . "<br>"; } } else { if (\model\FlashMessageService::DoesExist()) { $messageToUser = \model\FlashMessageService::Get(); } } } // Get login or logout form output return $this->auth->IsUserLoggedIn() ? $this->GetLogoutFormOutput($messageToUser) : $this->GetLoginFormOutput($messageToUser); }