protected function getBadgeHtml($label, $colorOrStatus = null, $toolTipLabel = null, $url = null)
    {
        $element = 'span';
        if ($colorOrStatus === null) {
            $color = 'black';
        } else if (in_array($colorOrStatus, AVH::STATUS_LIST)) {
            Checkers::checkStatus($colorOrStatus, 'default');
            $color = AVH::STATUS_COLOR_LIST[$colorOrStatus];
        } else {
            Checkers::checkColor($colorOrStatus);
            $color = $colorOrStatus;
        }
        $attributes = ['class' => 'badge bg-' . $color];
        if ($toolTipLabel !== null) {
            $attributes['data-toggle'] = 'tooltip';
            $attributes['title'] = $toolTipLabel;
        }
        if ($url) {
            $element = 'a';
            $attributes['href'] = $url;
        }
        if (strlen($label) > 30) {
            Checkers::notice('Badge label [' . $label . '] is probably too long');
        }
        return Html::buildHtmlElement($element, $attributes, $label);
    }