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

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

jimport('joomla.html.html');
jimport('joomla.form.formfield');
class JFormFieldFWUsersectionLayout extends JFormField {
	var	$type = 'fwusersectionlayout';

	function getInput() {
		$path = JPATH_SITE.'/components/com_fwfoodmenu/helpers/helper.php';
		if (!file_exists($path)) return;
		require_once($path);

		fwFoodMenuHelper::loadAdminStyles();
		JFactory::getLanguage()->load('com_fwfoodmenu');

		$layouts = array(
			JHTML::_('select.option', 'default', JText::_('FWFM_DEFAULT'), 'id', 'name')
		);
		JFactory::getApplication()->triggerEvent('ongetUsersectionLayouts', array('com_fwfoodmenu', &$layouts));
		return JHTML::_('select.genericlist', $layouts, $this->name, 'class="uk-select"', 'id', 'name', $this->value);
	}
}
