Beispiel #1
0
	/**
	 * Saves the message to template, that can be displayed after redirect
	 *
	 * @param  string
	 * @param  string
	 * @return stdClass
	 */
	public function flashMessage($message, $type = 'info')
	{
		$types = $this->getContext()->params['flashes'];
		if (isset($types[$type])) {
			$type = $types[$type];
		}

		return parent::flashMessage($message, $type);
	}
Beispiel #2
0
 /**
  * @param string
  * @param string
  * @param bool
  * @return \stdClass
  */
 public function flashMessage($message, $type = 'info', $withoutSession = FALSE)
 {
     if ($withoutSession) {
         $this->_flashes[] = $flash = (object) array('message' => $message, 'type' => $type);
     } else {
         $flash = parent::flashMessage($message, $type);
     }
     $id = $this->getParameterId('flash');
     $messages = $this->getPresenter()->getFlashSession()->{$id};
     $this->getTemplate()->flashes = array_merge((array) $messages, $this->_flashes);
     return $flash;
 }
 public function flashMessage($message, $type = 'info')
 {
     return $this->control->flashMessage($message, $type);
 }