File manager - Edit - /home/verseaumee/ptitsanes/administrator/components/com_solidres/models/fields/geostate.php
Back
<?php /** ------------------------------------------------------------------------ SOLIDRES - Accommodation booking extension for Joomla ------------------------------------------------------------------------ * @author Solidres Team <contact@solidres.com> * @website https://www.solidres.com * @copyright Copyright (C) 2013 - 2019 Solidres. All Rights Reserved. * @license GNU General Public License version 3, or later ------------------------------------------------------------------------ */ defined('_JEXEC') or die; /** * Supports an HTML select list of geo state * * @package Solidres * @subpackage Room * @since 1.6 */ class JFormFieldGeoState extends JFormField { /** * The form field type. * * @var string * @since 1.6 */ protected $type = 'GeoState'; /** * Method to get the field input markup. * * @return string The field input markup. * @since 1.6 */ protected function getInput() { $html = array(); $country_id = (int) $this->form->getValue('country_id', 0); $selectedId = (int) $this->form->getValue('geo_state_id', 0); if ($this->name == 'jform[contact_geo_state_id]') { $country_id = (int) $this->form->getValue('contact_country_id', 0); $selectedId = (int) $this->form->getValue('contact_geo_state_id', 0); } if (empty($selectedId)) { $selectedId = $this->value; } $options = SolidresHelper::getGeoStateOptions($country_id); $html[] = JHtml::_('select.genericlist', $options, $this->name, 'class="state_select ' . $this->class . '"', 'value', 'text', $selectedId); return implode($html); } }
| ver. 1.4 |
Github
|
.
| PHP 8.5.7 | Generation time: 0 |
proxy
|
phpinfo
|
Settings