public function actionDelete()
 {
     $object = CBaseManager::getWorkPlanContentSectionLoad(CRequest::getInt("id"));
     $section = $object->section_id;
     $object->remove();
     $this->redirect("workplancontentloads.php?action=index&section_id=" . $section);
 }
 public function actionAdd()
 {
     $object = new CWorkPlanSelfEducationBlock();
     $load = CBaseManager::getWorkPlanContentSectionLoad(CRequest::getInt("id"));
     $object->load_id = $load->getId();
     $object->plan_id = $load->section->module->plan_id;
     $this->setData("object", $object);
     /**
      * Генерация меню
      */
     $this->addActionsMenuItem(array("title" => "Назад", "link" => "workplancontentloads.php?action=edit&id=" . $object->load_id, "icon" => "actions/edit-undo.png"));
     /**
      * Отображение представления
      */
     $this->renderView("_corriculum/_workplan/selfEducationBlocks/add.tpl");
 }
 function handle_toggleDelete_load()
 {
     $loadId = CRequest::getInt('model_id');
     $load = CBaseManager::getWorkPlanContentSectionLoad($loadId);
     $load->markDeleted(!$load->isMarkDeleted());
     $load->save();
 }