protected function getEditFormCustomValues(array &$a_values) { // we cannot use $this->object->getOrderType() // if set to inherit it will be translated to parent setting include_once './Services/Container/classes/class.ilContainerSortingSettings.php'; $sort = new ilContainerSortingSettings($this->object->getId()); $a_values["sor"] = $sort->getSortMode(); }
/** * Add sorting */ protected function buildSorting() { include_once './Services/Container/classes/class.ilContainerSortingSettings.php'; include_once './Services/Container/classes/class.ilContainer.php'; $sorting = new ilContainerSortingSettings($this->getCategory()->getId()); switch ($sorting->getSortMode()) { case ilContainer::SORT_MANUAL: $type = 'Manual'; break; default: $type = 'Title'; break; } $this->xmlElement('Sorting', array('type' => $type)); }
function initEditForm() { $this->lng->loadLanguageModule($this->object->getType()); $this->setEditTabs(); include_once "Services/Form/classes/class.ilPropertyFormGUI.php"; $form = new ilPropertyFormGUI(); $form->setFormAction($this->ctrl->getFormAction($this)); $form->setTitle($this->lng->txt($this->object->getType() . "_edit")); // Show didactic template type $this->initDidacticTemplate($form); // sorting include_once 'Services/Container/classes/class.ilContainerSortingSettings.php'; $settings = new ilContainerSortingSettings($this->object->getId()); $sort = new ilRadioGroupInputGUI($this->lng->txt('sorting_header'), "sorting"); $sort_title = new ilRadioOption($this->lng->txt('sorting_title_header'), ilContainer::SORT_TITLE); $sort_title->setInfo($this->lng->txt('sorting_info_title')); $sort->addOption($sort_title); $sort_manual = new ilRadioOption($this->lng->txt('sorting_manual_header'), ilContainer::SORT_MANUAL); $sort_manual->setInfo($this->lng->txt('sorting_info_manual')); $sort->addOption($sort_manual); $sort->setValue($settings->getSortMode()); $form->addItem($sort); $this->showCustomIconsEditing(1, $form, false); // Edit ecs export settings include_once 'Modules/Category/classes/class.ilECSCategorySettings.php'; $ecs = new ilECSCategorySettings($this->object); $ecs->addSettingsToForm($form, 'cat'); $form->addCommandButton("update", $this->lng->txt("save")); $form->addCommandButton("addTranslation", $this->lng->txt("add_translation")); return $form; }
/** * show sorting settings * * @access protected */ protected function showSortingSettings() { $this->tpl->setVariable('TXT_SORTING', $this->lng->txt('sorting_header')); $this->tpl->setVariable('TXT_SORT_TITLE', $this->lng->txt('sorting_title_header')); $this->tpl->setVariable('INFO_SORT_TITLE', $this->lng->txt('sorting_info_title')); $this->tpl->setVariable('TXT_SORT_MANUAL', $this->lng->txt('sorting_manual_header')); $this->tpl->setVariable('INFO_SORT_MANUAL', $this->lng->txt('sorting_info_manual')); include_once 'Services/Container/classes/class.ilContainerSortingSettings.php'; if ($this->getCreationMode()) { $settings = new ilContainerSortingSettings(0); } else { $settings = new ilContainerSortingSettings($this->object->getId()); } $this->tpl->setVariable('RADIO_SORT_TITLE', ilUtil::formRadioButton($settings->getSortMode() == ilContainer::SORT_TITLE, 'sorting', ilContainer::SORT_TITLE)); $this->tpl->setVariable('RADIO_SORT_MANUAL', ilUtil::formRadioButton($settings->getSortMode() == ilContainer::SORT_MANUAL, 'sorting', ilContainer::SORT_MANUAL)); }