Your IP : 216.73.216.224


Current Path : /var/www/html/administrator/components/com_osmembership/model/fields/
Upload File :
Current File : /var/www/html/administrator/components/com_osmembership/model/fields/osmdiscounttype.php

<?php

/**
 * @package        Joomla
 * @subpackage     Membership Pro
 * @author         Tuan Pham Ngoc
 * @copyright      Copyright (C) 2012 - 2026 Ossolution Team
 * @license        GNU/GPL, see LICENSE.php
 */
defined('_JEXEC') or die;

use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\HTML\HTMLHelper;

if (version_compare(JVERSION, '4.4.99', '>'))
{
	JLoader::registerAlias('JFormFieldList', '\\Joomla\\CMS\\Form\\Field\\ListField');
}
else
{
	FormHelper::loadFieldClass('list');
}

class JFormFieldOSMDiscountType extends JFormFieldList
{
	/**
	 * The form field type.
	 *
	 * @var string
	 */
	protected $type = 'osmdiscounttype';

	protected function getOptions()
	{
		$config    = OSMembershipHelper::getConfig();
		$options   = [];
		$options[] = HTMLHelper::_('select.option', 0, '%');
		$options[] = HTMLHelper::_('select.option', 1, $config->currency_symbol);

		return $options;
	}
}