コード例 #1
0
ファイル: Haus.php プロジェクト: emersinlioglu/hausangebot
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getZaehlerstands()
 {
     return $this->hasMany(Zaehlerstand::className(), ['haus_id' => 'id']);
 }
コード例 #2
0
 /**
  * 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]);
 }