예제 #1
0
 public function error($msg, $template = \JS\Template\Messages\MessageFactory::MESSAGE_BOOTSTRAP)
 {
     $response = $this->getEvent()->getResponse()->setStatusCode(400);
     $response->getHeaders()->addHeaders(['Content-Type' => 'text/html']);
     $response->setContent(\JS\Template\Messages\MessageFactory::message($msg, $template, \JS\Template\Messages\MessageInterface::ERROR));
     return $response;
 }
예제 #2
0
 private function initListPriorityMessages()
 {
     $array = MessageFactory::create($this->type)->getListPriorityMessage();
     $newArray = array();
     foreach ($array as $value) {
         $newArray[$value] = [];
     }
     return $newArray;
 }