/** * Flash a general message. * * @param string $message * @param string $link * @param string $type * @return $this */ public function message($message, $link = '#', $type = 'success') { $this->session->flashy('flashy_notification.message', $message); $this->session->flashy('flashy_notification.link', $link); $this->session->flashy('flashy_notification.type', $type); return $this; }
/** * Flash the configuration to the session */ private function flashConfig() { foreach ($this->config as $key => $value) { $this->session->flash("notifier.{$key}", $value); } $this->session->flash('notifier.notice', $this->buildConfig()); }
/** * Flashes the current built configuration for sweet alert */ private function flashConfig() { foreach ($this->config as $key => $value) { $this->session->flash("sweet_alert.{$key}", $value); } $this->session->flash('sweet_alert.alert', $this->buildConfig()); }
/** * Flashes the current built configuration for sweet alert */ public function flashConfig() { foreach ($this->config as $key => $value) { $this->session->flash("sweet_alert.{$key}", $value); } $this->session->flash('sweet_alert.alert', json_encode($this->config)); }
/** * Flash a general message. * * @param string $message * @param string $type * @param string|null $header * @param bool|string $sticky * @param int|string $life * @param string $group * * @return $this */ public function message($message, $type = null, $header = null, $sticky = null, $life = null, $group = null) { $this->messages = $this->session->read('laragrowl_messages'); $jgrowl['message'] = $message; $jgrowl['type'] = in_array($type, $this->types) ? $type : 'default'; $jgrowl['header'] = $header == null ? '' : $header; $jgrowl['sticky'] = $sticky === true || $sticky == 'sticky' || $sticky == 'true' ? true : false; $jgrowl['life'] = $life == null || !is_numeric($life) ? 6000 : $life; $jgrowl['group'] = is_null($group) ? '' : $group; array_push($this->messages, $jgrowl); $this->session->write('laragrowl_messages', $this->messages); return $this; }
/** * @param $title * @param $content * @param bool|string $icon * @param string $level * @param bool $close */ public function message($title, $content, $icon, $level = 'info', $close = true) { $this->session->flash('alert.title', $title); $this->session->flash('alert.content', $content); $this->session->flash('alert.level', $level); $this->session->flash('alert.close', $close); // if icon == true, get icon from level, else if icon is string, set icon if (is_bool($icon) && $icon == true || strlen($icon) > 1) { $icon = is_string($icon) ? $icon : alert_icon($level); $this->session->flash('alert.icon', $icon); } }
/** * Flash a notification message * * @param string $level * @param $title * @param $content * @param bool|string $icon * @param $iconSmall * @param int $timeout */ public function message($level = 'info', $title, $content, $icon, $iconSmall, $timeout = 5000) { $this->session->flash('notify.level', $level); $this->session->flash('notify.title', $title); $this->session->flash('notify.content', $content); // if icon == true, get icon from level, else if icon is string, set icon if (is_bool($icon) && $icon == true || strlen($icon) > 1) { $icon = is_string($icon) ? $icon : notify_icon($level); $this->session->flash('notify.icon', $icon . ' animated'); } // if icon == true, get icon from level, else if icon is string, set icon if (is_bool($iconSmall) && $iconSmall == true || strlen($iconSmall) > 1) { $iconSmall = is_string($iconSmall) ? $iconSmall : notify_icon_small($level); $this->session->flash('notify.iconSmall', $iconSmall . ' animated'); } if ($timeout > 0) { $this->session->flash('notify.timeout', $timeout); } }
/** * Add an "important" flash to the session. * * @return $this */ public function important() { $this->session->flash('flash_notification.important', ' important'); return $this; }
/** * Create a flash message. * * @param string $title * @param string $message * @param string $level */ public function message($title, $message, $level) { $this->session->flash('flashalert.title', $title); $this->session->flash('flashalert.message', $message); $this->session->flash('flashalert.level', $level); }
/** * Add an important flash message to the session. * * @param $message * @return $this */ public function important($message) { $this->session->flash('egall.important', TRUE); return $this; }
public function create($title, $message, $level, $key = 'message') { $this->session->flash($key, ['title' => $title, 'message' => $message, 'level' => $level]); }
/** * Flash a general message. Use this if you don't want to use Sweet Alert. * * @param string $message * @param string $level * * @return $this */ public function message($message, $level = 'info') { $this->session->flash('flash_notification.message', $message); $this->session->flash('flash_notification.level', $level); return $this; }
/** * Create a flash message. * * @param string $message * @param string $level * @param string $title */ public function message($message, $level = 'info', $title = 'Notice') { $this->session->flash('caffeinated.flash.message', $message); $this->session->flash('caffeinated.flash.level', $level); }
/** * @param $message * @param string $level */ public function message($message, $level = 'info', $title = 'Notice') { $this->session->flash('flash_notification.message', $message); $this->session->flash('flash_notification.level', $level); }
public function top_message($message) { $this->session->flash('flash_warning', $message); return $this; }