Exemple #1
0
 private function mergeHelper()
 {
     $newRecord = new Dolzhnost();
     $newRecord->nazvanie = $this->name;
     $newRecord->obschij = true;
     $newRecord->save();
     if (!$this->loadDolzhnosti(false)) {
         throw new Exception('Dolzhnosti didn\'t loaded.');
     }
     foreach ($this->getDolzhnosti() as $rec) {
         $this->relinkRelations($rec, $newRecord);
         $rec->delete();
     }
     return true;
 }