/** * Read * * @access private * */ private function read() { if (!$this->obj_id) { return true; } include_once 'Services/Container/classes/class.ilContainerSortingSettings.php'; $this->manual_sort_enabled = ilContainerSortingSettings::_isManualSortingEnabled($this->obj_id); $this->sorting_mode = ilContainerSortingSettings::_lookupSortMode($this->obj_id); $query = "SELECT * FROM container_sorting " . "WHERE obj_id = " . $this->db->quote($this->obj_id, 'integer') . " ORDER BY position"; $res = $this->db->query($query); while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) { if ($row->parent_id) { $this->sorting[$row->parent_type][$row->parent_id][$row->child_id] = $row->position; } else { $this->sorting['all'][$row->child_id] = $row->position; } } return true; }