public function actionAdd() { $module = CBaseManager::getWorkPlanContentModule(CRequest::getInt("id")); $object = new CWorkPlanContentSection(); $object->module_id = $module->getId(); $object->sectionIndex = $module->sections->getCount() + 1; $this->setData("object", $object); /** * Генерация меню */ $this->addActionsMenuItem(array("title" => "Назад", "link" => "workplancontentmodules.php?action=edit&id=" . $object->module_id, "icon" => "actions/edit-undo.png")); /** * Отображение представления */ $this->renderView("_corriculum/_workplan/contentSections/add.tpl"); }
public function actionDelete() { $object = CBaseManager::getWorkPlanContentModule(CRequest::getInt("id")); $plan = $object->plan_id; $object->remove(); $this->redirect("workplans.php?action=edit&id=" . $plan); }
public function actionGetObject($id) { return CBaseManager::getWorkPlanContentModule($id); }