当前位置: 首页>>代码示例>>PHP>>正文


PHP SearchForm::getCityField方法代码示例

本文整理汇总了PHP中SearchForm::getCityField方法的典型用法代码示例。如果您正苦于以下问题:PHP SearchForm::getCityField方法的具体用法?PHP SearchForm::getCityField怎么用?PHP SearchForm::getCityField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SearchForm的用法示例。


在下文中一共展示了SearchForm::getCityField方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: actionLoadForm

 public function actionLoadForm()
 {
     if (!Yii::app()->request->isAjaxRequest) {
         throw404();
     }
     $this->objType = Yii::app()->request->getParam('obj_type_id');
     $isInner = Yii::app()->request->getParam('is_inner');
     $roomsMin = Yii::app()->request->getParam('room_min');
     $roomsMax = Yii::app()->request->getParam('room_max');
     if ($roomsMin || $roomsMax) {
         $this->roomsCountMin = $roomsMin;
         $this->roomsCountMax = $roomsMax;
     }
     $this->sApId = (int) Yii::app()->request->getParam('sApId');
     $floorMin = Yii::app()->request->getParam('floor_min');
     $floorMax = Yii::app()->request->getParam('floor_max');
     if ($floorMin || $floorMax) {
         $this->floorCountMin = $floorMin;
         $this->floorCountMax = $floorMax;
     }
     $floor = Yii::app()->request->getParam('floor');
     if ($floor) {
         $this->floorCount = $floor;
     }
     if (issetModule('selecttoslider') && param('useSquareSlider') == 1) {
         $squareMin = Yii::app()->request->getParam('square_min');
         $squareMax = Yii::app()->request->getParam('square_max');
         if ($squareMin || $squareMax) {
             $this->squareCountMin = $squareMin;
             $this->squareCountMax = $squareMax;
         }
     } else {
         $square = Yii::app()->request->getParam('square');
         if ($square) {
             $this->squareCount = $square;
         }
     }
     if (issetModule('location') && param('useLocation', 1)) {
         $country = Yii::app()->request->getParam('country');
         if ($country) {
             $this->selectedCountry = $country;
         }
         $region = Yii::app()->request->getParam('region');
         if ($region) {
             $this->selectedRegion = $region;
         }
         $city = Yii::app()->request->getParam('city');
         if ($city) {
             $this->selectedCity = $city;
         }
     } else {
         $city = Yii::app()->request->getParam('city');
         if ($city) {
             $this->selectedCity = $city;
         }
     }
     $this->objType = Yii::app()->request->getParam('objType');
     $this->apType = Yii::app()->request->getParam('apType');
     /*        if(issetModule('selecttoslider') && param('usePriceSlider') == 1) {
                 $priceMin = Yii::app()->request->getParam("price_min");
                 $priceMax = Yii::app()->request->getParam("price_max");
     
                 if($priceMin || $priceMax) {
                     $this->priceSlider["min"] = $priceMin;
                     $this->priceSlider["max"] = $priceMax;
                 }
             } else {
                 $price = Yii::app()->request->getParam('price');
     
                 if(issetModule('currency')){
                     $priceDefault = ceil(Currency::convertToDefault($price));
                 } else {
                     $priceDefault = $price;
                 }
     
                 if($priceDefault) {
                     $this->price = $price;
                 }
             }*/
     if (issetModule('formeditor')) {
         $newFieldsAll = FormDesigner::getNewFields();
         foreach ($newFieldsAll as $field) {
             $value = CHtml::encode(Yii::app()->request->getParam($field->field));
             if (!$value) {
                 continue;
             }
             $fieldString = $field->field;
             $this->newFields[$fieldString] = $value;
         }
     }
     $compact = Yii::app()->request->getParam('compact', 0);
     HAjax::jsonOk('', array('html' => $this->renderPartial('//site/_search_form', array('isInner' => $isInner, 'compact' => $compact), true), 'sliderRangeFields' => SearchForm::getSliderRangeFields(), 'cityField' => SearchForm::getCityField(), 'countFiled' => SearchForm::getCountFiled(), 'compact' => $compact));
 }
开发者ID:alexjkitty,项目名称:estate,代码行数:93,代码来源:MainController.php

示例2: isset

<?php

$isInner = isset($isInner) ? $isInner : 0;
$compact = param("useCompactInnerSearchForm", true);
$loc = issetModule('location') && param('useLocation', 1) ? 1 : 0;
$urlReloadForm = Yii::app()->createUrl('/quicksearch/main/loadForm', array('lang' => Yii::app()->language));
?>

	var sliderRangeFields = <?php 
echo CJavaScript::encode(SearchForm::getSliderRangeFields());
?>
;
	var cityField = <?php 
echo CJavaScript::encode(SearchForm::getCityField());
?>
;
	var loc = <?php 
echo CJavaScript::encode($loc);
?>
;
	var countFiled = <?php 
echo CJavaScript::encode(SearchForm::getCountFiled() + ($loc ? 2 : 0));
?>
;
	var isInner = <?php 
echo CJavaScript::encode($isInner);
?>
;
	var heightField = 54;
	var advancedIsOpen = 0;
	var compact = <?php 
开发者ID:barricade86,项目名称:raui,代码行数:31,代码来源:_search_js.php


注:本文中的SearchForm::getCityField方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。