<?php
/**
 * FW Food menu 5.1.1
 * @copyright (C) 2020 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) {
        $this->menu = 'translation';
        $model = $this->getModel();
        $model->getAddons();

        $this->app = JFactory::getApplication();
        $this->type = (int)$model->getUserState('type', 0, 'int');
        $this->search = $model->getUserState('search', '', 'string');
        $this->language = fwFoodMenuHelper::getLanguage();
        $this->languages = fwFoodMenuHelper::getInstalledLanguages();
		$this->extensions = $model->loadExtensions();
		$this->extension = $model->getUserState('extension', 'com_fwfoodmenu', 'string');
		$this->obj = $model->getExtension($this->extensions, $this->extension);
        $this->data = $model->getLanguageData($this->obj);
        $this->pagination = $model->getPagination($this->data);
        $this->path = $model->getLanguageFilename();
        $this->path_overrides = $model->getLanguageOverridesFilename();
        $this->params = JComponentHelper::getParams('com_fwfoodmenu');
		fwFoodMenuHelper::triggerEvent('onLoadMainMenu', array('com_fwfoodmenu', 'translation', $this));
        parent::display($tmpl);
    }
}
