<?php

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

jimport('joomla.plugin.plugin');

class plgButtonARTIOFusionCharts extends JPlugin
{

    function plgButtonARTIOFusionChart(& $subject, $config)
    {
        parent::__construct($subject, $config);
    }

    function onDisplay($name)
    {
        $link = 'index.php?option=com_artiofusioncharts&plugin=1&tmpl=component&e_name=' . $name;
        $link = htmlentities($link);
        JHTML::_('behavior.modal');
        $button = new JObject();
        $button->set('modal', true);
        $button->set('link', $link);
        $button->set('text', JText::_('ARTIOFusionChart'));
        $button->set('name', 'readmore');
        $button->set('options', "{handler: 'iframe', size: {x: 800, y: 400}}");
        return $button;
    }
}

?>