| Current Path : /var/www/html/administrator/components/com_osmembership/elements/ |
| Current File : /var/www/html/administrator/components/com_osmembership/elements/osmcurrency.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\Field\ListField;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
class JFormFieldOSMCurrency extends ListField
{
/**
* The form field type.
*
* @var string
*/
protected $type = 'osmcurrency';
protected function getOptions()
{
$currencies = require_once JPATH_ROOT . '/components/com_osmembership/helper/currencies.php';
$options = [];
$options[] = HTMLHelper::_('select.option', '', Text::_('Select Currency'));
foreach ($currencies as $code => $title)
{
$options[] = HTMLHelper::_('select.option', $code, $title);
}
return $options;
}
}