<?php
defined('_JEXEC') or die('Restricted access');
/**
 *
 * @package RealEstateManager
 * @copyright 2012-2017 by Ordasoft
 * @author Andrey Kvasnevskiy - OrdaSoft (akbet@mail.ru); Rob de Cleen (rob@decleen.com);
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
 * Homepage: https://ordasoft.com/
 *
**/

require_once ( JPATH_SITE.'/components/com_realestatemanager/functions.php' );

if (version_compare(JVERSION, "1.6.0", "ge") ){
    class JFormFieldShowSearchHouselayout extends JFormField{
        protected function getInput(){
            $all_houses_layout = getLayoutsRem('com_realestatemanager','show_search_house');
            $layouts = Array();
            $layouts[] = JHtml::_('select.option', '', 'Use Global');
            foreach($all_houses_layout as $value){
                $layouts[] = JHtml::_('select.option', "$value", "$value");
            }
            return JHtml::_('select.genericlist', $layouts, $this->name, 'class="inputbox"', 'value', 'text', $this->value, $this->name);
        }
    }
} else {echo "Sanity test. Error version check!"; exit;}
