MDL-53113 libraries: Remove deprecated constants

This commit is contained in:
Ankit Agarwal 2017-12-27 08:57:20 +05:30 committed by Eloy Lafuente (stronk7)
parent f5b956679e
commit 3becfcd226

View File

@ -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.');
}
}
/**