ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilConsultationHourGroup Class Reference

Description of class. More...

+ Collaboration diagram for ilConsultationHourGroup:

Public Member Functions

 __construct ($a_group_id=0)
 Constructor.
 getGroupId ()
 setUserId ($a_id)
 getUserId ()
 setMaxAssignments ($a_num)
 getMaxAssignments ()
 setTitle ($a_title)
 getTitle ()
 save ()
 Save new group to db type $ilDB.
 update ()
 Update group information type $ilDB.
 delete ()

Protected Member Functions

 read ()
 type $ilDB

Private Attributes

 $group_id = 0
 $usr_id = 0
 $num_assignments = 1
 $title = ''

Detailed Description

Description of class.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e

Definition at line 10 of file class.ilConsultationHourGroup.php.

Constructor & Destructor Documentation

ilConsultationHourGroup::__construct (   $a_group_id = 0)

Constructor.

Parameters
int$a_group_id

Definition at line 22 of file class.ilConsultationHourGroup.php.

References read().

{
$this->group_id = $a_group_id;
$this->read();
}

+ Here is the call graph for this function:

Member Function Documentation

ilConsultationHourGroup::delete ( )

Definition at line 103 of file class.ilConsultationHourGroup.php.

References $query, getGroupId(), and ilBookingEntry\resetGroup().

{
global $ilDB;
$query = 'DELETE FROM cal_ch_group '.
'WHERE grp_id = '.$ilDB->quote($this->getGroupId(),'integer');
$ilDB->manipulate($query);
include_once './Services/Booking/classes/class.ilBookingEntry.php';
}

+ Here is the call graph for this function:

ilConsultationHourGroup::getGroupId ( )

Definition at line 28 of file class.ilConsultationHourGroup.php.

References $group_id.

Referenced by delete(), read(), save(), and update().

{
}

+ Here is the caller graph for this function:

ilConsultationHourGroup::getMaxAssignments ( )

Definition at line 48 of file class.ilConsultationHourGroup.php.

References $num_assignments.

Referenced by save(), and update().

+ Here is the caller graph for this function:

ilConsultationHourGroup::getTitle ( )

Definition at line 59 of file class.ilConsultationHourGroup.php.

References $title.

Referenced by save(), and update().

{
return $this->title;
}

+ Here is the caller graph for this function:

ilConsultationHourGroup::getUserId ( )

Definition at line 38 of file class.ilConsultationHourGroup.php.

References $usr_id.

Referenced by save(), and update().

{
return $this->usr_id;
}

+ Here is the caller graph for this function:

ilConsultationHourGroup::read ( )
protected

type $ilDB

Returns
boolean

Definition at line 121 of file class.ilConsultationHourGroup.php.

References $query, $res, $row, DB_FETCHMODE_OBJECT, getGroupId(), setMaxAssignments(), setTitle(), and setUserId().

Referenced by __construct().

{
global $ilDB;
if(!$this->getGroupId())
{
return false;
}
$query = 'SELECT * FROM cal_ch_group '.
'WHERE grp_id = '.$ilDB->quote($this->getGroupId(),'integer');
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->setUserId($row->usr_id);
$this->setTitle($row->title);
$this->setMaxAssignments($row->multiple_assignments);
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilConsultationHourGroup::save ( )

Save new group to db type $ilDB.

Returns
int new group id

Definition at line 69 of file class.ilConsultationHourGroup.php.

References $query, getGroupId(), getMaxAssignments(), getTitle(), and getUserId().

{
global $ilDB;
$this->group_id = $ilDB->nextId('cal_ch_group');
$query = 'INSERT INTO cal_ch_group (grp_id,usr_id,multiple_assignments,title) '.
'VALUES ( '.
$ilDB->quote($this->getGroupId(),'integer').', '.
$ilDB->quote($this->getUserId(),'integer').', '.
$ilDB->quote($this->getMaxAssignments(),'integer').', '.
$ilDB->quote($this->getTitle(),'text').
')';
$ilDB->manipulate($query);
return $this->getGroupId();
}

+ Here is the call graph for this function:

ilConsultationHourGroup::setMaxAssignments (   $a_num)

Definition at line 43 of file class.ilConsultationHourGroup.php.

Referenced by read().

{
$this->num_assignments = $a_num;
}

+ Here is the caller graph for this function:

ilConsultationHourGroup::setTitle (   $a_title)

Definition at line 54 of file class.ilConsultationHourGroup.php.

Referenced by read().

{
$this->title = $a_title;
}

+ Here is the caller graph for this function:

ilConsultationHourGroup::setUserId (   $a_id)

Definition at line 33 of file class.ilConsultationHourGroup.php.

Referenced by read().

{
$this->usr_id = $a_id;
}

+ Here is the caller graph for this function:

ilConsultationHourGroup::update ( )

Update group information type $ilDB.

Returns
boolean

Definition at line 90 of file class.ilConsultationHourGroup.php.

References $query, getGroupId(), getMaxAssignments(), getTitle(), and getUserId().

{
global $ilDB;
$query = 'UPDATE cal_ch_group SET '.
'usr_id = '.$ilDB->quote($this->getUserId(),'integer').', '.
'multiple_assignments = '.$ilDB->quote($this->getMaxAssignments(),'integer').', '.
'title = '.$ilDB->quote($this->getTitle(),'text').' '.
'WHERE grp_id = '.$ilDB->quote($this->getGroupId(),'integer');
$ilDB->manipulate($query);
return true;
}

+ Here is the call graph for this function:

Field Documentation

ilConsultationHourGroup::$group_id = 0
private

Definition at line 13 of file class.ilConsultationHourGroup.php.

Referenced by getGroupId().

ilConsultationHourGroup::$num_assignments = 1
private

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

Referenced by getMaxAssignments().

ilConsultationHourGroup::$title = ''
private

Definition at line 16 of file class.ilConsultationHourGroup.php.

Referenced by getTitle().

ilConsultationHourGroup::$usr_id = 0
private

Definition at line 14 of file class.ilConsultationHourGroup.php.

Referenced by getUserId().


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