|
@@ 158-165 (lines=8) @@
|
| 155 |
|
* @param string $title The notification's title |
| 156 |
|
* @param array $options |
| 157 |
|
*/ |
| 158 |
|
public function info($text, $onlyNextRequest = true, array $options = []) |
| 159 |
|
{ |
| 160 |
|
$theme = (isset($options['theme']) && $options['theme'] != '') ? $options['theme'] : 'metroui'; |
| 161 |
|
$timeout = (isset($options['timeout']) && $options['timeout'] != '' && is_int($options['timeout'])) ? $options['timeout'] : false; |
| 162 |
|
$layout = (isset($options['layout']) && $options['layout'] != '') ? $options['layout'] : 'topRight'; |
| 163 |
|
|
| 164 |
|
$this->add($theme, $timeout, 'info', $layout, $text, null, null, $onlyNextRequest); |
| 165 |
|
} |
| 166 |
|
|
| 167 |
|
/** |
| 168 |
|
* Shortcut for adding an error notification |
|
@@ 174-181 (lines=8) @@
|
| 171 |
|
* @param string $title The notification's title |
| 172 |
|
* @param array $options |
| 173 |
|
*/ |
| 174 |
|
public function error($text, $onlyNextRequest = true, array $options = []) |
| 175 |
|
{ |
| 176 |
|
$theme = (isset($options['theme']) && $options['theme'] != '') ? $options['theme'] : 'metroui'; |
| 177 |
|
$timeout = (isset($options['timeout']) && $options['timeout'] != '' && is_int($options['timeout'])) ? $options['timeout'] : 0; |
| 178 |
|
$layout = (isset($options['layout']) && $options['layout'] != '') ? $options['layout'] : 'topRight'; |
| 179 |
|
|
| 180 |
|
$this->add($theme, $timeout, 'error', $layout, $text, null, null, $onlyNextRequest); |
| 181 |
|
} |
| 182 |
|
|
| 183 |
|
/** |
| 184 |
|
* Shortcut for adding a warning notification |
|
@@ 190-197 (lines=8) @@
|
| 187 |
|
* @param string $title The notification's title |
| 188 |
|
* @param array $options |
| 189 |
|
*/ |
| 190 |
|
public function warning($text, $onlyNextRequest = true, array $options = []) |
| 191 |
|
{ |
| 192 |
|
$theme = (isset($options['theme']) && $options['theme'] != '') ? $options['theme'] : 'metroui'; |
| 193 |
|
$timeout = (isset($options['timeout']) && $options['timeout'] != '' && is_int($options['timeout'])) ? $options['timeout'] : 0; |
| 194 |
|
$layout = (isset($options['layout']) && $options['layout'] != '') ? $options['layout'] : 'topRight'; |
| 195 |
|
|
| 196 |
|
$this->add($theme, $timeout, 'warning', $layout, $text, null, null, $onlyNextRequest); |
| 197 |
|
} |
| 198 |
|
|
| 199 |
|
/** |
| 200 |
|
* Shortcut for adding a success notification |
|
@@ 206-213 (lines=8) @@
|
| 203 |
|
* @param string $title The notification's title |
| 204 |
|
* @param array $options |
| 205 |
|
*/ |
| 206 |
|
public function success($text, $onlyNextRequest = true, array $options = []) |
| 207 |
|
{ |
| 208 |
|
$theme = (isset($options['theme']) && $options['theme'] != '') ? $options['theme'] : 'metroui'; |
| 209 |
|
$timeout = (isset($options['timeout']) && $options['timeout'] != '' && is_int($options['timeout'])) ? $options['timeout'] : 0; |
| 210 |
|
$layout = (isset($options['layout']) && $options['layout'] != '') ? $options['layout'] : 'topRight'; |
| 211 |
|
$this->add($theme, $timeout, 'success', $layout, $text, null, null, $onlyNextRequest); |
| 212 |
|
} |
| 213 |
|
|
| 214 |
|
|
| 215 |
|
/** |
| 216 |
|
* Clear all notifications |