/** * @return bool */ public function saveObject() { if (!$this->checkInput()) { return false; } if (!$this->is_new) { $this->object->setCheckValue($this->getInput(self::F_CHECK_VALUE)); $this->object->update(); } else { $this->object->setUdfFieldId($this->getInput(self::F_UDF_FIELD_ID)); $this->object->setParentId($_GET[ilUserSettingsGUI::IDENTIFIER]); $this->object->create(); } return $this->object->getId(); }
/** * @param array $a_set */ public function fillRow($a_set) { $ilUDFCheck = ilUDFCheck::find($a_set['id']); $ilUDFCheckGUI = new ilUDFCheckGUI($this->parent_obj); foreach ($this->getSelectableColumns() as $k => $v) { if ($k == 'actions') { $this->ctrl->setParameter($this->parent_obj, ilUDFCheckGUI::IDENTIFIER, $ilUDFCheck->getId()); $this->ctrl->setParameter($ilUDFCheckGUI, ilUDFCheckGUI::IDENTIFIER, $ilUDFCheck->getId()); $current_selection_list = new ilAdvancedSelectionListGUI(); $current_selection_list->setListTitle($this->pl->txt('check_actions')); $current_selection_list->setId('check_actions' . $ilUDFCheck->getId()); $current_selection_list->setUseImages(false); $current_selection_list->addItem($this->pl->txt('check_edit'), 'check_edit', $this->ctrl->getLinkTarget($this->parent_obj, ilUserSettingsGUI::CMD_EDIT)); $current_selection_list->addItem($this->pl->txt('check_delete'), 'check_delete', $this->ctrl->getLinkTarget($this->parent_obj, ilUserSettingsGUI::CMD_CONFIRM_DELETE)); $this->tpl->setCurrentBlock('td'); $this->tpl->setVariable('VALUE', $current_selection_list->getHTML()); $this->tpl->parseCurrentBlock(); continue; } if ($this->isColumnSelected($k)) { if ($a_set[$k]) { $this->tpl->setCurrentBlock('td'); $this->tpl->setVariable('VALUE', is_array($a_set[$k]) ? implode(", ", $a_set[$k]) : $a_set[$k]); $this->tpl->parseCurrentBlock(); } else { $this->tpl->setCurrentBlock('td'); $this->tpl->setVariable('VALUE', ' '); $this->tpl->parseCurrentBlock(); } } } }
public function afterObjectLoad() { $ilUDFChecks = ilUDFCheck::where(array('parent_id' => $this->getId()))->get(); $this->setUdfCheckObjects($ilUDFChecks); }
<#1> <?php require_once './Customizing/global/plugins/Services/EventHandling/EventHook/UserDefaults/classes/UDFCheck/class.ilUDFCheck.php'; require_once './Customizing/global/plugins/Services/EventHandling/EventHook/UserDefaults/classes/UserSetting/class.ilUserSetting.php'; ilUDFCheck::installDB(); ilUserSetting::installDB(); ?> <#2> <?php require_once './Customizing/global/plugins/Services/EventHandling/EventHook/UserDefaults/classes/UserSetting/class.ilUserSetting.php'; ilUserSetting::updateDB(); ?> <#3> <?php require_once './Customizing/global/plugins/Services/EventHandling/EventHook/UserDefaults/classes/UserSetting/class.ilUserSetting.php'; ilUserSetting::updateDB(); ?> <#4> <?php require_once './Customizing/global/plugins/Services/EventHandling/EventHook/UserDefaults/classes/UserSetting/class.ilUserSetting.php'; ilUserSetting::updateDB(); ?> <#5> <?php require_once './Customizing/global/plugins/Services/EventHandling/EventHook/UserDefaults/classes/UserSetting/class.ilUserSetting.php'; ilUserSetting::updateDB();
public function delete() { $ilUDFCheck = ilUDFCheck::find($_GET[self::IDENTIFIER]); $ilUDFCheck->delete(); $this->cancel(); }