<?php
/**
 * FW Food menu 5.1.1
 * @copyright C 2019 Fastw3b
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
 * @link http://www.fastw3b.net/ Official website
 **/

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

class menuViewTranslation extends JViewLegacy {
    function display($tmpl=null) {
        $model = $this->getModel();
        $data = new stdclass;
        switch ($this->getLayout()) {
            case 'copy_to_overrides' :
                $data->result = $model->copy();
                break;
            case 'lang_request' :
                $data->result = $model->request();
                break;
            case 'lang_reinstall' :
                $data->result = $model->request(true);
                break;
            case 'upload' :
                $data->result = $model->upload();
                break;
        }
        $data->msg = $model->getError();
        die(json_encode($data));
    }
}
