public function actionAdmin_panel()
 {
     $model = new Decisions();
     if ($model->load(Yii::$app->request->post())) {
         if ($model->validate()) {
             // form inputs are valid, do something here
             return;
         }
     }
     return $this->render('admin_panel', ['model' => $model]);
 }
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Decisions::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['like', 'ada', $this->ada])->andFilterWhere(['like', 'protocolNumber', $this->protocolNumber])->andFilterWhere(['like', 'subject', $this->subject])->andFilterWhere(['like', 'issueDate', $this->issueDate])->andFilterWhere(['like', 'decisionTypeId', $this->decisionTypeId])->andFilterWhere(['like', 'organizationId', $this->organizationId])->andFilterWhere(['like', 'submissionTimestamp', $this->submissionTimestamp])->andFilterWhere(['like', 'status', $this->status])->andFilterWhere(['like', 'versionId', $this->versionId])->andFilterWhere(['like', 'documentChecksum', $this->documentChecksum])->andFilterWhere(['like', 'correctedVersionId', $this->correctedVersionId]);
     return $dataProvider;
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getB13Ada()
 {
     return $this->hasOne(Decisions::className(), ['ada' => 'b13_ada']);
 }
 /**
  * Finds the Decisions model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param string $id
  * @return Decisions the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Decisions::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }