29        $this->db = 
$DIC->database();
 
   41        $query = 
'DELETE FROM adv_md_record_obj_ord ' .
 
   42            'WHERE obj_id = ' . $this->db->quote($obj_id, 
'integer');
 
   43        $this->db->manipulate(
$query);
 
  119        $local_pos_a = isset($this->record_position_map[$a->
getRecordId()]) ?
 
  126        $local_pos_b = isset($this->record_position_map[$b->
getRecordId()]) ?
 
  133        if ($local_pos_a == $local_pos_b) {
 
  136        if ($local_pos_a < $local_pos_b) {
 
  139        if ($local_pos_a > $local_pos_b) {
 
  151        $query = 
'SELECT record_id, position FROM adv_md_record_obj_ord ' .
 
  152            'WHERE obj_id = ' . $this->db->quote($obj_id, 
'integer');
 
  155        $this->record_position_map = [];
 
  157            $this->record_position_map[
$row->record_id] = 
$row->position;
 
An exception for terminatinating execution or to throw for unit testing.
sortRecords(array $records, int $obj_id=null)
readPositionsForObject(int $obj_id)
Read local positions for object.
compareRecords(\ilAdvancedMDRecord $a, \ilAdvancedMDRecord $b)
compareLocalRecords(\ilAdvancedMDRecord $a, \ilAdvancedMDRecord $b)
deleteByObjId(int $obj_id)
Delete entries by obj_id.
__construct()
ilAdvancedMDRecordObjectOrderings constructor.
setGlobalPosition(int $position)
Set global position.
getRecordId()
Get record id.
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
foreach($_POST as $key=> $value) $res