htmlHelper::getNotifications PHP Method

getNotifications() public method

Returns a list of notifications if there are any - similar to the Flash feature of Ruby on Rails
public getNotifications ( mixed $messages, string $class = 'errormessage' ) : string
$messages mixed String or an array of strings
$class string
return string Returns null if there are no notifications to return
    public function getNotifications($messages, $class = 'errormessage')
    {
        if (isset($messages) && $messages) {
            return '<div class="' . $class . '">' . (is_array($messages) ? implode('<br />', $messages) : $messages) . '</div>';
        }
    }