public function actionDelete() { $object = CBaseManager::getWorkPlanFundMarkType(CRequest::getInt("id")); $section = $object->section; $object->remove(); $order = 1; foreach ($section->fundMarkTypes as $fundMarkType) { $fundMarkType->ordering = $order++; $fundMarkType->save(); } $this->redirect("workplanfundmarktypes.php?action=index&id=" . $section->getId()); }