コード例 #1
0
ファイル: FlashMessages.php プロジェクト: klaid83/ms
 public function __invoke()
 {
     $messages = array();
     if ($this->flashMessenger->hasMessages()) {
         $messages['common'] = $this->flashMessenger->getMessages();
     }
     if ($this->flashMessenger->hasSuccessMessages()) {
         $messages['success'] = $this->flashMessenger->getSuccessMessages();
     }
     if ($this->flashMessenger->hasInfoMessages()) {
         $messages['info'] = $this->flashMessenger->getInfoMessages();
     }
     if ($this->flashMessenger->hasErrorMessages()) {
         $messages['danger'] = $this->flashMessenger->getErrorMessages();
     }
     if ($this->flashMessenger->hasWarningMessages()) {
         $messages['warning'] = $this->flashMessenger->getWarningMessages();
     }
     return $messages;
 }