<?php
/**
 * FileName: category.php
 * Date: September 2016
 * License: GNU General Public License
 * JOS Version #: 1.6.x
 * Development OrdaSoft(http://ordasoft.com)
 */
/**
 *
 * @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/
 *
**/

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

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

if (version_compare(JVERSION, "1.6.0", "ge") ){
    class JFormFieldSearchResultlayout extends JFormField{
        protected function getInput(){
            $search_result_layout = getLayoutsRem('com_realestatemanager','search_result');
            $layouts = Array();
            $layouts[] = JHtml::_('select.option', '', 'Use Global');
            foreach($search_result_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;
}
