Notification

Add a notification to user

Arguments

$title
string: Message title text
Array: Parameters
$type
string: Message type

Example

Add an normal feedback to user:

$this->get('notification','Hello user!');

Add message to user:

$this->get('notification', 'You are awesome!', 'message');

Add an error message to the user:

$this->get('notification',Array(
    'type' => 'error',
    'title' => 'You are not so great.'
));

Add a message to the user:

$this->get('notification', Array(
    'type'  => 'message',
    'title' => 'You are so great.'
));

Add a colorful message to user:

$this->get('notification',array(
   'title' => 'Sky is blue',
   'description' => 'And Im green',
   'color' => 'green'
));

List of available parameters

Parameter Description
id Notification ID.
title Notification title text.
description Notification additional text.
icon Icon url.
link Link url.
onclick Function to run when cliked.
type Predefined type: notification (yellow), error (red), message(blue).
color  UI color: green, red, blue, yellow, gray...
user  User id for messages: Default: current user.