mirror of
https://github.com/moodle/moodle.git
synced 2025-03-18 22:50:19 +01:00
MDL-53113 libraries: Remove deprecated constants
This commit is contained in:
parent
f5b956679e
commit
3becfcd226
@ -55,24 +55,6 @@ class notification implements \renderable, \templatable {
|
||||
*/
|
||||
const NOTIFY_ERROR = 'error';
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* A generic message.
|
||||
*/
|
||||
const NOTIFY_MESSAGE = 'message';
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* A message notifying the user that a problem occurred.
|
||||
*/
|
||||
const NOTIFY_PROBLEM = 'problem';
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* A notification of level 'redirect'.
|
||||
*/
|
||||
const NOTIFY_REDIRECT = 'redirect';
|
||||
|
||||
/**
|
||||
* @var string Message payload.
|
||||
*/
|
||||
@ -102,7 +84,7 @@ class notification implements \renderable, \templatable {
|
||||
* Notification constructor.
|
||||
*
|
||||
* @param string $message the message to print out
|
||||
* @param string $messagetype normally NOTIFY_PROBLEM or NOTIFY_SUCCESS.
|
||||
* @param string $messagetype one of the NOTIFY_* constants..
|
||||
*/
|
||||
public function __construct($message, $messagetype = null) {
|
||||
$this->message = $message;
|
||||
@ -112,13 +94,6 @@ class notification implements \renderable, \templatable {
|
||||
}
|
||||
|
||||
$this->messagetype = $messagetype;
|
||||
|
||||
switch ($messagetype) {
|
||||
case self::NOTIFY_PROBLEM:
|
||||
case self::NOTIFY_REDIRECT:
|
||||
case self::NOTIFY_MESSAGE:
|
||||
debugging('Use of ' . $messagetype . ' has been deprecated. Please switch to an alternative type.');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user