Added ability to set temporary admin messages

This commit is contained in:
Andy Miller
2017-08-16 10:59:22 -06:00
parent 2f94c936ad
commit 2f363e2de6
3 changed files with 21 additions and 1 deletions

View File

@@ -107,6 +107,11 @@ class Admin
*/
protected $loading_additional_files_in_background = false;
/**
* @var array
*/
protected $temp_messages = [];
/**
* Constructor.
*
@@ -402,6 +407,16 @@ class Admin
$messages->add($msg, $type);
}
public function addTempMessage($msg, $type)
{
$this->temp_messages[] = ['message' => $msg, 'scope' => $type];
}
public function getTempMessages()
{
return $this->temp_messages;
}
/**
* Translate a string to the user-defined language
*