Your IP : 216.73.216.219


Current Path : /home/chauffn/vuzelia/2023/administrator/components/com_rstbox/EngageBox/
Upload File :
Current File : /home/chauffn/vuzelia/2023/administrator/components/com_rstbox/EngageBox/Helper.php

<?php

/**
 * @package         EngageBox
 * @version         5.1.3 Pro
 * 
 * @author          Tassos Marinos <info@tassos.gr>
 * @link            http://www.tassos.gr
 * @copyright       Copyright © 2020 Tassos Marinos All Rights Reserved
 * @license         GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
*/

namespace EngageBox;

defined('_JEXEC') or die('Restricted access');

use NRFramework\Cache;

class Helper 
{
    public static function getParams()
    {
        $hash = 'ebParams';

        if (Cache::has($hash))
        {
            return Cache::get($hash);
        }

        return Cache::set($hash, \JComponentHelper::getParams('com_rstbox'));
    }

    /**
     *  Returns all available box types
     *
     *  @return  array
     */
    public static function getBoxTypes()
    {
        \JPluginHelper::importPlugin('engagebox');
        \JFactory::getApplication()->triggerEvent('onEngageBoxTypes', array(&$types));

        asort($types);

        return $types;
    }

    /**
     *  Get Visitor ID
     *
     *  @return  string
     */
    public static function getVisitorID()
    {
        return \NRFramework\VisitorToken::getInstance()->get();
    }

    public static function arrayToCSSS($array)
    {
        $array = array_filter($array);

        if (empty($array))
        {
            return '';
        }

        $styles = '';

        foreach ($array as $key => $value)
        {
            $styles .= $key . ':' . $value . ';';
        }

        return $styles;
    }

    public static function licenseIsValid()
    {
        return \NRFramework\Functions::getDownloadKey();
    }
}