Your IP : 216.73.216.240


Current Path : /home/juvelize/saulnois/tmp/install_695d2cf0b4957/src/View/Sky/
Upload File :
Current File : /home/juvelize/saulnois/tmp/install_695d2cf0b4957/src/View/Sky/Badge.php

<?php
/*
* @package		Tech Fry Library
* @license		https://www.gnu.org/licenses/gpl-3.0.en.html
*/

namespace TechFry\Library\View\Sky;

defined('_JEXEC') or die;

class Badge extends Bootstrap
{
    public $class_options = array('badge_class', 'type', 'border_radius');

    public function display()
    {
        if (isset($this->config['type']) && $this->config['type'])
        {
            $this->config['type'] = 'text-bg-' . $this->config['type'];
        }

        $badge_class = 'badge ' . $this->get_class();

        // $this->data an be string or array
        $badges = (array) $this->data;

        $output = '';
        foreach ($badges as $badge)
        {
            $output .= $this->html->span($badge, array('class' => $badge_class));
        }

        return $output;
    }
}