ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilAdvancedMDRecordObjectOrdering Class Reference
+ Collaboration diagram for ilAdvancedMDRecordObjectOrdering:

Public Member Functions

 __construct (int $record_id, int $obj_id, ilDBInterface $db)
 ilAdvancedMDRecordObjectOrdering constructor. More...
 
 setPosition (int $position)
 
 getPosition ()
 
 save ()
 Save entry. More...
 
 delete ()
 Delete entry. More...
 

Private Attributes

 $record_id
 
 $obj_id
 
 $position
 
 $db
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilAdvancedMDRecordObjectOrdering::__construct ( int  $record_id,
int  $obj_id,
ilDBInterface  $db 
)

ilAdvancedMDRecordObjectOrdering constructor.

Parameters
int$record_id
int$obj_id

Definition at line 39 of file class.ilAdvancedMDRecordObjectOrdering.php.

References $db, $obj_id, and $record_id.

Member Function Documentation

◆ delete()

ilAdvancedMDRecordObjectOrdering::delete ( )

Delete entry.

Definition at line 84 of file class.ilAdvancedMDRecordObjectOrdering.php.

References $query.

85  {
86  $query = 'DELETE FROM adv_md_record_obj_ord WHERE ' .
87  'record_id = ' . $this->db->quote($this->record_id, 'integer') . ' ' .
88  'AND obj_id = ' . $this->db->quote($this->obj_id, 'integer');
89  $this->db->manipulate($query);
90  }
$query

◆ getPosition()

ilAdvancedMDRecordObjectOrdering::getPosition ( )
Returns
int

Definition at line 58 of file class.ilAdvancedMDRecordObjectOrdering.php.

References $position.

◆ save()

ilAdvancedMDRecordObjectOrdering::save ( )

Save entry.

Exceptions
ilDatabaseException

Definition at line 67 of file class.ilAdvancedMDRecordObjectOrdering.php.

References $query.

68  {
69  $this->delete();
70 
71  $query = 'INSERT INTO adv_md_record_obj_ord (record_id, obj_id, position ) ' .
72  'VALUES ( ' .
73  $this->db->quote($this->record_id, 'integer') . ', ' .
74  $this->db->quote($this->obj_id, 'integer') . ', ' .
75  $this->db->quote($this->position, 'integer') . ' ' .
76  ')';
77 
78  $this->db->manipulate($query);
79  }
$query

◆ setPosition()

ilAdvancedMDRecordObjectOrdering::setPosition ( int  $position)
Parameters
int$position

Definition at line 50 of file class.ilAdvancedMDRecordObjectOrdering.php.

References $position.

Field Documentation

◆ $db

ilAdvancedMDRecordObjectOrdering::$db
private

Definition at line 31 of file class.ilAdvancedMDRecordObjectOrdering.php.

Referenced by __construct().

◆ $obj_id

ilAdvancedMDRecordObjectOrdering::$obj_id
private

Definition at line 20 of file class.ilAdvancedMDRecordObjectOrdering.php.

Referenced by __construct().

◆ $position

ilAdvancedMDRecordObjectOrdering::$position
private

Definition at line 25 of file class.ilAdvancedMDRecordObjectOrdering.php.

Referenced by getPosition(), and setPosition().

◆ $record_id

ilAdvancedMDRecordObjectOrdering::$record_id
private

Definition at line 15 of file class.ilAdvancedMDRecordObjectOrdering.php.

Referenced by __construct().


The documentation for this class was generated from the following file: