/** * @return \yii\db\ActiveQuery */ public function getZaehlerstands() { return $this->hasMany(Zaehlerstand::className(), ['haus_id' => 'id']); }
/** * Deletes an existing Teileigentumseinheit model. * If deletion is successful, the browser will be redirected to the 'index' page. * @param string $id * @return mixed */ public function actionDeletezaehlerstand($hausId, $zaehlerstandId) { $zaehlerstand = Zaehlerstand::findOne($zaehlerstandId); if ($zaehlerstand) { $zaehlerstand->delete(); } return $this->redirect(['update', 'id' => $hausId]); }