public function actionTest1()
 {
     $model = new TbCriterial();
     $model = TbCriterial::find()->one();
     if ($model) {
         echo $model->getAttribute('ctr_criterial');
         //var_dump($model);
     }
 }
 public function actionIndex()
 {
     $dataProvider = new ActiveDataProvider(['query' => TbCriterial::find()]);
     return $this->render('index', ['dataProvider' => $dataProvider]);
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getTbCriterials()
 {
     return $this->hasMany(TbCriterial::className(), ['ctr_tnk_id' => 'tkp_id']);
 }
 public function actionTest()
 {
     $cri = TbCriterial::getTaskByPID(1);
     echo AppCommon::renderJSON($cri);
 }
 /**
  * Finds the TbCriterial model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return TbCriterial the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = TbCriterial::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }