private function createHtmlByType(array $notifications, $type)
    {
        $html = "<div class='alert-box {$type} radius' data-alert>";
        foreach ($notifications as $notification) {
            $html .= "{$notification}";
            // If it's not the last notification, add a line break for the next one
            if (end($notifications) !== $notification) {
                $html .= "<br />";
            }
        }
        $html .= "<a href='#' class='close'>&times;</a>";
        $html .= "</div>";

        return $html;
    }