|
|
|
@ -464,91 +464,6 @@ class Display |
|
|
|
|
$table->display(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Displays a normal message. It is recommended to use this public function |
|
|
|
|
* to display any normal information messages. |
|
|
|
|
* |
|
|
|
|
* @param string $message |
|
|
|
|
* @param bool $filter (true) or not (false) |
|
|
|
|
* @param bool $returnValue |
|
|
|
|
* |
|
|
|
|
* @deprecated Use <code>Display::addFlash(Display::return_message($message, 'normal'));</code> |
|
|
|
|
* Or <code>echo Display::return_message($message, 'normal')</code> |
|
|
|
|
*/ |
|
|
|
|
public static function display_normal_message( |
|
|
|
|
$message, |
|
|
|
|
$filter = true, |
|
|
|
|
$returnValue = false |
|
|
|
|
) { |
|
|
|
|
$message = self::return_message($message, 'normal', $filter); |
|
|
|
|
if ($returnValue) { |
|
|
|
|
return $message; |
|
|
|
|
} else { |
|
|
|
|
echo $message; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Displays an warning message. Use this if you want to draw attention to something |
|
|
|
|
* This can also be used for instance with the hint in the exercises. |
|
|
|
|
* |
|
|
|
|
* @deprecated use Display::addFlash(Display::return_message($message, 'warning')); |
|
|
|
|
*/ |
|
|
|
|
public static function display_warning_message( |
|
|
|
|
$message, |
|
|
|
|
$filter = true, |
|
|
|
|
$returnValue = false |
|
|
|
|
) { |
|
|
|
|
$message = self::return_message($message, 'warning', $filter); |
|
|
|
|
if ($returnValue) { |
|
|
|
|
return $message; |
|
|
|
|
} else { |
|
|
|
|
echo $message; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Displays an confirmation message. Use this if something has been done successfully. |
|
|
|
|
* |
|
|
|
|
* @param bool Filter (true) or not (false) |
|
|
|
|
* |
|
|
|
|
* @deprecated use Display::addFlash(Display::return_message($message, 'confirm')); |
|
|
|
|
*/ |
|
|
|
|
public static function display_confirmation_message( |
|
|
|
|
$message, |
|
|
|
|
$filter = true, |
|
|
|
|
$returnValue = false |
|
|
|
|
) { |
|
|
|
|
$message = self::return_message($message, 'confirm', $filter); |
|
|
|
|
if ($returnValue) { |
|
|
|
|
return $message; |
|
|
|
|
} else { |
|
|
|
|
echo $message; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Displays an error message. It is recommended to use this public function if an error occurs. |
|
|
|
|
* |
|
|
|
|
* @param string $message - include any additional html |
|
|
|
|
* tags if you need them |
|
|
|
|
* @param bool Filter (true) or not (false) |
|
|
|
|
* |
|
|
|
|
* @deprecated use Display::addFlash(Display::return_message($message, 'error')); |
|
|
|
|
*/ |
|
|
|
|
public static function display_error_message( |
|
|
|
|
$message, |
|
|
|
|
$filter = true, |
|
|
|
|
$returnValue = false |
|
|
|
|
) { |
|
|
|
|
$message = self::return_message($message, 'error', $filter); |
|
|
|
|
if ($returnValue) { |
|
|
|
|
return $message; |
|
|
|
|
} else { |
|
|
|
|
echo $message; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @param string $message |
|
|
|
|
* @param string $type |
|
|
|
|