private function loadInternalMove($id) { $model = InternalMove::findOne($id); if ($model) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }
/** * @return \yii\db\ActiveQuery */ public function getInternalMove() { return $this->hasOne(InternalMove::className(), ['id' => 'internal_move_id']); }
/** * @return \yii\db\ActiveQuery */ public function getInternalMoves() { return $this->hasMany(InternalMove::className(), ['internal_move_request_id' => 'id']); }