ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilAdvancedMDRecordObjectOrdering Class Reference
+ Collaboration diagram for ilAdvancedMDRecordObjectOrdering:

Public Member Functions

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

Protected Attributes

ilDBInterface $db
 

Private Attributes

int $record_id
 
int $obj_id
 
int $position = 0
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

Member Function Documentation

◆ delete()

ilAdvancedMDRecordObjectOrdering::delete ( )

Delete entry.

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

70 : void
71 {
72 $query = 'DELETE FROM adv_md_record_obj_ord WHERE ' .
73 'record_id = ' . $this->db->quote($this->record_id, 'integer') . ' ' .
74 'AND obj_id = ' . $this->db->quote($this->obj_id, 'integer');
75 $this->db->manipulate($query);
76 }

◆ getPosition()

ilAdvancedMDRecordObjectOrdering::getPosition ( )

◆ save()

ilAdvancedMDRecordObjectOrdering::save ( )

Save entry.

Exceptions
ilDatabaseException

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

53 : void
54 {
55 $this->delete();
56
57 $query = 'INSERT INTO adv_md_record_obj_ord (record_id, obj_id, position ) ' .
58 'VALUES ( ' .
59 $this->db->quote($this->record_id, 'integer') . ', ' .
60 $this->db->quote($this->obj_id, 'integer') . ', ' .
61 $this->db->quote($this->position, 'integer') . ' ' .
62 ')';
63
64 $this->db->manipulate($query);
65 }

◆ setPosition()

ilAdvancedMDRecordObjectOrdering::setPosition ( int  $position)

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

39 : void
40 {
41 $this->position = $position;
42 }

References $position.

Field Documentation

◆ $db

ilDBInterface ilAdvancedMDRecordObjectOrdering::$db
protected

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

Referenced by __construct().

◆ $obj_id

int ilAdvancedMDRecordObjectOrdering::$obj_id
private

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

Referenced by __construct().

◆ $position

int ilAdvancedMDRecordObjectOrdering::$position = 0
private

◆ $record_id

int ilAdvancedMDRecordObjectOrdering::$record_id
private

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

Referenced by __construct().


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