|
@@ -36,6 +36,7 @@ class FlashMessage
|
|
|
protected $_defaultConfig = [
|
|
protected $_defaultConfig = [
|
|
|
'key' => 'flash',
|
|
'key' => 'flash',
|
|
|
'element' => 'default',
|
|
'element' => 'default',
|
|
|
|
|
+ 'plugin' => null,
|
|
|
'params' => [],
|
|
'params' => [],
|
|
|
'clear' => false,
|
|
'clear' => false,
|
|
|
'duplicate' => true,
|
|
'duplicate' => true,
|
|
@@ -67,7 +68,9 @@ class FlashMessage
|
|
|
* ### Options:
|
|
* ### Options:
|
|
|
*
|
|
*
|
|
|
* - `key` The key to set under the session's Flash key.
|
|
* - `key` The key to set under the session's Flash key.
|
|
|
- * - `element` The element used to render the flash message.
|
|
|
|
|
|
|
+ * - `element` The element used to render the flash message. You can use
|
|
|
|
|
+ * `'SomePlugin.name'` style value for flash elements from a plugin.
|
|
|
|
|
+ * - `plugin` Plugin name to use element from.
|
|
|
* - `params` An array of variables to be made available to the element.
|
|
* - `params` An array of variables to be made available to the element.
|
|
|
* - `clear` A bool stating if the current stack should be cleared to start a new one.
|
|
* - `clear` A bool stating if the current stack should be cleared to start a new one.
|
|
|
* - `escape` Set to false to allow templates to print out HTML content.
|
|
* - `escape` Set to false to allow templates to print out HTML content.
|
|
@@ -86,6 +89,9 @@ class FlashMessage
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
[$plugin, $element] = pluginSplit($options['element']);
|
|
[$plugin, $element] = pluginSplit($options['element']);
|
|
|
|
|
+ if ($options['plugin']) {
|
|
|
|
|
+ $plugin = $options['plugin'];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
if ($plugin) {
|
|
if ($plugin) {
|
|
|
$options['element'] = $plugin . '.flash/' . $element;
|
|
$options['element'] = $plugin . '.flash/' . $element;
|