/var/www/ektaservice/data/www/ektaservice.ua/application/models/Review.php(47)
35 //array('rating', 'required', 'on'=>'insert', 'message'=>Yii::t('personal', 'Необходимо оценить качество услуг')), 36 array('name, email', 'length', 'max'=>128), 37 array('phone', 'length', 'min'=>10, 'max'=>10), 38 array('date_creation', 'default', 'on'=>'insert', 'value'=>new CDbExpression('NOW()')), 39 array('date_modification', 'default', 'on'=>'update', 'value'=>new CDbExpression('NOW()'), 'setOnEmpty'=>false), 40 array('text, comment', 'filter', 'filter'=>'strip_tags'), 41 array('front, rating', 'numerical', 'integerOnly'=>true), 42 array('auth, client_id', 'unsafe'), 43 // The following rule is used by search(). 44 array('id, name, email, rating, text, comment, date_creation, date_modification', 'safe', 'on'=>'search'), 45 46 ); 47 if (strpos($_SERVER['HTTP_REFERER'],'/admin/') === false) { 48 $rules[] = array('verifyCode', 'required'); 49 $rules[] = array('verifyCode', 'ext.yiiReCaptcha.ReCaptchaValidator'); 50 } 51 // NOTE: you should only define rules for those attributes that 52 // will receive user inputs. 53 return $rules; 54 } 55 56 /** 57 * @return array relational rules. 58 */ 59 public function relations() {
#0 |
+
–
/var/www/ektaservice/data/www/ektaservice.ua/framework/base/CModel.php(284): Review->rules() 279 * @return CList validators built based on {@link rules()}. 280 */ 281 public function createValidators() 282 { 283 $validators=new CList; 284 foreach($this->rules() as $rule) 285 { 286 if(isset($rule[0],$rule[1])) // attributes, validator name 287 $validators->add(CValidator::createValidator($rule[1],$this,$rule[0],array_slice($rule,2))); 288 else 289 throw new CException(Yii::t('yii','{class} has an invalid validation rule. The rule must specify attributes to be validated and the validator name.', |
#1 |
+
–
/var/www/ektaservice/data/www/ektaservice.ua/framework/base/CModel.php(260): CModel->createValidators() 255 * @return array the validators applicable to the current {@link scenario}. 256 */ 257 public function getValidators($attribute=null) 258 { 259 if($this->_validators===null) 260 $this->_validators=$this->createValidators(); 261 262 $validators=array(); 263 $scenario=$this->getScenario(); 264 foreach($this->_validators as $validator) 265 { |
#2 |
+
–
/var/www/ektaservice/data/www/ektaservice.ua/framework/web/helpers/CHtml.php(2436): CModel->getValidators("name") 2431 $type==='datetime-local'||$type==='email'||$type==='month'||$type==='number'||$type==='range'|| 2432 $type==='search'||$type==='tel'||$type==='time'||$type==='url'||$type==='week') 2433 { 2434 if(!isset($htmlOptions['maxlength'])) 2435 { 2436 foreach($model->getValidators($attribute) as $validator) 2437 { 2438 if($validator instanceof CStringValidator && $validator->max!==null) 2439 { 2440 $htmlOptions['maxlength']=$validator->max; 2441 break; |
#3 |
+
–
/var/www/ektaservice/data/www/ektaservice.ua/framework/web/helpers/CHtml.php(1534): CHtml::activeInputField("text", Review, "name", array("class" => "form-control", "name" => "Review[name]", "id" => "Review_name")) 1529 */ 1530 public static function activeTextField($model,$attribute,$htmlOptions=array()) 1531 { 1532 self::resolveNameID($model,$attribute,$htmlOptions); 1533 self::clientChange('change',$htmlOptions); 1534 return self::activeInputField('text',$model,$attribute,$htmlOptions); 1535 } 1536 1537 /** 1538 * Generates a search field input for a model attribute. 1539 * If the attribute has input error, the input field's CSS class will |
#4 |
+
–
/var/www/ektaservice/data/www/ektaservice.ua/framework/web/widgets/CActiveForm.php(792): CHtml::activeTextField(Review, "name", array("class" => "form-control")) 787 * @param array $htmlOptions additional HTML attributes. 788 * @return string the generated input field 789 */ 790 public function textField($model,$attribute,$htmlOptions=array()) 791 { 792 return CHtml::activeTextField($model,$attribute,$htmlOptions); 793 } 794 795 /** 796 * Renders a search field for a model attribute. 797 * This method is a wrapper of {@link CHtml::activeSearchField}. |
#5 |
+
–
/var/www/ektaservice/data/www/ektaservice.ua/application/views/site/reviews.php(28): CActiveForm->textField(Review, "name", array("class" => "form-control")) 23 <div class="form-group"> 24 <label for="name" class="col-sm-2 control-label"> 25 <?= Yii::t('public', 'Имя'); ?> 26 </label> 27 <div class="col-sm-10"> 28 <?php echo $form->textField($model, 'name', array('class'=>'form-control')); ?> 29 <?php echo $form->error($model, 'name'); ?> 30 </div> 31 </div> 32 <div class="form-group"> 33 <label for="email" class="col-sm-2 control-label"> |
#6 |
+
–
/var/www/ektaservice/data/www/ektaservice.ua/framework/web/CBaseController.php(126): require("/var/www/ektaservice/data/www/ektaservice.ua/application/views/s...") 121 $data=$_data_; 122 if($_return_) 123 { 124 ob_start(); 125 ob_implicit_flush(false); 126 require($_viewFile_); 127 return ob_get_clean(); 128 } 129 else 130 require($_viewFile_); 131 } |
#7 |
+
–
/var/www/ektaservice/data/www/ektaservice.ua/framework/web/CBaseController.php(95): CBaseController->renderInternal("/var/www/ektaservice/data/www/ektaservice.ua/application/views/s...", array("model" => Review, "page" => Page, "reviews" => array(Review, Review, Review, Review, ...)), true) 090 { 091 $widgetCount=count($this->_widgetStack); 092 if(($renderer=Yii::app()->getViewRenderer())!==null && $renderer->fileExtension==='.'.CFileHelper::getExtension($viewFile)) 093 $content=$renderer->renderFile($this,$viewFile,$data,$return); 094 else 095 $content=$this->renderInternal($viewFile,$data,$return); 096 if(count($this->_widgetStack)===$widgetCount) 097 return $content; 098 else 099 { 100 $widget=end($this->_widgetStack); |
#8 |
+
–
/var/www/ektaservice/data/www/ektaservice.ua/framework/web/CController.php(869): CBaseController->renderFile("/var/www/ektaservice/data/www/ektaservice.ua/application/views/s...", array("model" => Review, "page" => Page, "reviews" => array(Review, Review, Review, Review, ...)), true) 864 */ 865 public function renderPartial($view,$data=null,$return=false,$processOutput=false) 866 { 867 if(($viewFile=$this->getViewFile($view))!==false) 868 { 869 $output=$this->renderFile($viewFile,$data,true); 870 if($processOutput) 871 $output=$this->processOutput($output); 872 if($return) 873 return $output; 874 else |
#9 |
+
–
/var/www/ektaservice/data/www/ektaservice.ua/framework/web/CController.php(782): CController->renderPartial("reviews", array("model" => Review, "page" => Page, "reviews" => array(Review, Review, Review, Review, ...)), true) 777 */ 778 public function render($view,$data=null,$return=false) 779 { 780 if($this->beforeRender($view)) 781 { 782 $output=$this->renderPartial($view,$data,true); 783 if(($layoutFile=$this->getLayoutFile($this->layout))!==false) 784 $output=$this->renderFile($layoutFile,array('content'=>$output),true); 785 786 $this->afterRender($view,$output); 787 |
#10 |
+
–
/var/www/ektaservice/data/www/ektaservice.ua/application/controllers/SiteController.php(136): CController->render("reviews", array("model" => Review, "page" => Page, "reviews" => array(Review, Review, Review, Review, ...))) 131 } 132 } 133 134 $reviews = Review::model()->findAll(array('condition'=>'front IS NOT NULL AND id>1392', 'order'=>'date_creation DESC')); 135 136 $this->render('reviews', array('model'=>$model, 'page' => $page, 'reviews'=>$reviews)); 137 } 138 139 public function actionSpecial($alias=null) { 140 if ($alias) { 141 $special = array( |
#11 |
+
–
/var/www/ektaservice/data/www/ektaservice.ua/framework/web/actions/CInlineAction.php(49): SiteController->actionReviews() 44 $controller=$this->getController(); 45 $method=new ReflectionMethod($controller, $methodName); 46 if($method->getNumberOfParameters()>0) 47 return $this->runWithParamsInternal($controller, $method, $params); 48 49 $controller->$methodName(); 50 return true; 51 } 52 } |
#12 |
+
–
/var/www/ektaservice/data/www/ektaservice.ua/framework/web/CController.php(308): CInlineAction->runWithParams(array("lang" => "uk")) 303 { 304 $priorAction=$this->_action; 305 $this->_action=$action; 306 if($this->beforeAction($action)) 307 { 308 if($action->runWithParams($this->getActionParams())===false) 309 $this->invalidActionParams($action); 310 else 311 $this->afterAction($action); 312 } 313 $this->_action=$priorAction; |
#13 |
+
–
/var/www/ektaservice/data/www/ektaservice.ua/framework/web/CController.php(286): CController->runAction(CInlineAction) 281 * @see runAction 282 */ 283 public function runActionWithFilters($action,$filters) 284 { 285 if(empty($filters)) 286 $this->runAction($action); 287 else 288 { 289 $priorAction=$this->_action; 290 $this->_action=$action; 291 CFilterChain::create($this,$action,$filters)->run(); |
#14 |
+
–
/var/www/ektaservice/data/www/ektaservice.ua/framework/web/CController.php(265): CController->runActionWithFilters(CInlineAction, array()) 260 { 261 if(($parent=$this->getModule())===null) 262 $parent=Yii::app(); 263 if($parent->beforeControllerAction($this,$action)) 264 { 265 $this->runActionWithFilters($action,$this->filters()); 266 $parent->afterControllerAction($this,$action); 267 } 268 } 269 else 270 $this->missingAction($actionID); |
#15 |
+
–
/var/www/ektaservice/data/www/ektaservice.ua/framework/web/CWebApplication.php(282): CController->run("reviews") 277 { 278 list($controller,$actionID)=$ca; 279 $oldController=$this->_controller; 280 $this->_controller=$controller; 281 $controller->init(); 282 $controller->run($actionID); 283 $this->_controller=$oldController; 284 } 285 else 286 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 287 array('{route}'=>$route===''?$this->defaultController:$route))); |
#16 |
+
–
/var/www/ektaservice/data/www/ektaservice.ua/framework/web/CWebApplication.php(141): CWebApplication->runController("site/reviews") 136 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 137 $_GET[$name]=$value; 138 } 139 else 140 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 141 $this->runController($route); 142 } 143 144 /** 145 * Registers the core application components. 146 * This method overrides the parent implementation by registering additional core components. |
#17 |
+
–
/var/www/ektaservice/data/www/ektaservice.ua/framework/base/CApplication.php(185): CWebApplication->processRequest() 180 public function run() 181 { 182 if($this->hasEventHandler('onBeginRequest')) 183 $this->onBeginRequest(new CEvent($this)); 184 register_shutdown_function(array($this,'end'),0,false); 185 $this->processRequest(); 186 if($this->hasEventHandler('onEndRequest')) 187 $this->onEndRequest(new CEvent($this)); 188 } 189 190 /** |
#18 |
+
–
/var/www/ektaservice/data/www/ektaservice.ua/index.php(13): CApplication->run() 08 defined('YII_DEBUG') or define('YII_DEBUG',true); 09 // specify how many levels of call stack should be shown in each log message 10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3); 11 12 require_once($yii); 13 Yii::createWebApplication($config)->run(); |