Exemplo n.º 1
0
 /**
  * Test method: setFlashAlert().
  */
 public function testSetFlashAlert()
 {
     $alert = $this->alertManager->create();
     $alert->addSuccess('success');
     $this->alertManager->setFlashAlert($alert);
     $this->assertEquals($alert->all(), $this->alertManager->getFlashAlerts());
 }
Exemplo n.º 2
0
 /**
  * Render flash alerts template.
  *
  * @param array $options
  *
  * @return string
  */
 public function renderFlash($options = array())
 {
     $options['alerts'] = $this->alertManager->getFlashAlerts();
     if (empty($options['alerts'])) {
         return '';
     }
     return $this->alertHelper->render($options, $this->getTemplate($options));
 }