/** * */ public function removeStop($pn_stop_id) { if (!($vn_tour_id = $this->getPrimaryKey())) { return false; } $t_stop = new ca_tour_stops(); if ($this->inTransaction()) { $t_stop->setTransaction($this->getTransaction()); } if (!$t_stop->load(array('tour_id' => $vn_tour_id, 'stop_id' => $pn_stop_id))) { return false; } $t_stop->setMode(ACCESS_WRITE); return $t_stop->delete(true); }