<?php
/**
* @package   Gridbox
* @author    Balbooa http://www.balbooa.com/
* @copyright Copyright @ Balbooa
* @license   http://www.gnu.org/licenses/gpl.html GNU/GPL
*/

namespace Balbooa\Component\Gridbox\Site\View\Create;

use Joomla\CMS\Factory;
use Joomla\CMS\MVC\View\HtmlView as BaseView;
use Joomla\CMS\Uri\Uri;

defined('_JEXEC') or die;

class HtmlView extends BaseView
{
    public function display($tpl = null)
    {
        $input = Factory::getApplication()->input;
        $id = $input->get('id', 0);
        $src = 'index.php?option=com_gridbox&view=editor';
        if ($id != 0) {
        	$src .= '&app_id='.$id;
        }
        $src .= '&tmpl=component&id=';
        header('Location: '. Uri::root().$src);
        exit;
    }
}