<?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 JHTMLfwFoodmenuFields {
	static function getList() {
		return array(
			(object)array('key' => 'meal.id', 'title' => 'FWFM_MEAL_ID', 'translate'=>false),
			(object)array('key' => 'meal.name', 'title' => 'FWFM_MEAL_NAME', 'translate'=>true),
			(object)array('key' => 'meal.description', 'title' => 'FWRE_MEAL_DESCRIPTION', 'translate'=>true),
			(object)array('key' => 'category.id', 'title' => 'FWFM_CATEGORY_ID', 'translate'=>false),
			(object)array('key' => 'category.name', 'title' => 'FWFM_CATEGORY_NAME', 'translate'=>true),
			(object)array('key' => 'category.short_description', 'title' => 'FWRE_CATEGORY_SHORT_DESCRIPTION', 'translate'=>true),
			(object)array('key' => 'category.description', 'title' => 'FWRE_CATEGORY_DESCRIPTION', 'translate'=>true),
		);
	}
	static function loadList() {
		static $list = null;
		if (!is_array($list)) {
			$list = JHTMLfwFoodmenuFields::getList();
			$app = JFactory::getApplication();
			$app->triggerEvent('onGetFields', array('com_fwfoodmenu', &$list));
    	}
        return $list;
    }
}
