Beispiel #1
0
 public function canDelete()
 {
     $model = \app\records\DolzhnostFizLicaNaRabote::findOne($this->id);
     if (!$model) {
         return false;
     }
     return !$model->getKursy_fiz_lica_rel()->exists();
 }
Beispiel #2
0
 /**
  * @return ActiveQuery
  */
 public function getDolzhnosti_fiz_lica_na_rabote_rel()
 {
     return $this->hasMany(DolzhnostFizLicaNaRabote::className(), ['rabota_fiz_lica' => 'id'])->inverseOf('rabota_fiz_lica_rel');
 }