Пример #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getOwner()
 {
     return $this->hasOne(Owner::className(), ['id' => 'owner_id']);
 }
Пример #2
0
 /**
  * Deletes an existing Owner model.
  * If deletion is successful, the browser will be redirected to the 'manage' page.
  * @param integer $id
  * @return mixed
  */
 public function actionDelete($id)
 {
     $this->findModel(Owner::className(), $id)->delete();
     return $this->redirect(['manage']);
 }