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/Overlay.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 Overlay extends Bootstrap
{
    public function display()
    {
        // data - image, description 
        // config - image_class, desc_class, location
        
        $this->data = (array) $this->data;

        $image_class = $this->config['image_class'] ?? '';
        $desc_class = 'position-absolute ' . $this->config['location'] . ' ' . $this->config['desc_class'];

        $output = '<div class="position-relative">';

            $output .= $this->html->img($this->data['image'], array('class' => $image_class));

            $output .= '<div class="' . $desc_class . '">';
                $output .= $this->data['description'];
            $output .= '</div>';
        $output .= '</div>';

        return $output;
    }
}