User Tools

Site Tools



Notices are messages that outputs to the user upon a complete page render. After output notices are emptied.

There are 4 different types of notices:

  • Success
  • Notices
  • Warnings
  • Errors

A notice can be stored in the message stack by the following command:

$system->notices->data['success'][] = 'your message'; // 1.0.x
notices::$data['success'][] = 'your message'; // 1.1+

LiteCart makes use of notices before making changes to data like when validating form data:

if (empty($_POST['name'])) notices::$data['errors'][] = 'You must enter a name';

if (empty(notices::$data['errors'])) {
  // Do some magic
library/notices.txt · Last modified: 2020/08/27 11:45 by 2a01:4f8:161:806b::2