Table of Contents

Badge

A badge is a small counter or info next to a text info,

Badge

Syntax

$renderAdminLTE->getBadge($aOptions);

Return

{string} html code

Parameters

  • $aOptions - {array} options to describe the element

Styling:

Key Description
bgcolor optional: background color (without prefix “bg”); hint: you should prefer a “type”.
class optional: additional css classes
type one of
- [empty]
- “danger”
- “dark”
- “info”
- “primary”
- “secondary”
- “success”
- “warning”

Content:

Key Description
text visible text
title title

Other:

Key Description
id optional: additional id attribute

Example

$renderAdminLTE->getBadge([
    'type'=>'danger',
    'title'=>'Errors: 5',
    'text'=>'5',
]);;