コード例 #1
0
 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());
         }
     }
 }
コード例 #2
0
 public function GetHTML()
 {
     $messageToUser = '';
     // Get exception messages if there are any.
     if (\model\ExceptionsService::HasExceptions()) {
         foreach (\model\ExceptionsService::GetAllExceptionMessages() as $message) {
             $messageToUser .= $message . "<br>";
         }
     } else {
         if (!\model\ValidationService::IsValid()) {
             foreach (\model\ValidationService::GetValidationErrors() as $message) {
                 $messageToUser .= $message . "<br>";
             }
         } else {
             if (\model\FlashMessageService::DoesExist()) {
                 $messageToUser .= \model\FlashMessageService::Get();
             }
         }
     }
     // Get output
     return $this->GetRegisterFormOutput($messageToUser);
 }
コード例 #3
0
 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);
 }