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; }
private function initListPriorityMessages() { $array = MessageFactory::create($this->type)->getListPriorityMessage(); $newArray = array(); foreach ($array as $value) { $newArray[$value] = []; } return $newArray; }