/** * Add sorting direction * @param ilFormPropertyGUI $element */ protected function initSortingDirectionForm(ilContainerSortingSettings $sorting_settings, $element, $a_prefix) { $direction = new ilRadioGroupInputGUI($this->lng->txt('sorting_direction'), $a_prefix . '_sorting_direction'); $direction->setValue($sorting_settings->getSortDirection()); $direction->setRequired(TRUE); // asc $asc = new ilRadioOption($this->lng->txt('sorting_asc'), ilContainer::SORT_DIRECTION_ASC); $direction->addOption($asc); // desc $desc = new ilRadioOption($this->lng->txt('sorting_desc'), ilContainer::SORT_DIRECTION_DESC); $direction->addOption($desc); $element->addSubItem($direction); return $element; }