Stores status (accepted/declined) of shared calendars.
More...
Stores status (accepted/declined) of shared calendars.
- Author
- Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Definition at line 31 of file class.ilCalendarSharedStatus.php.
◆ __construct()
ilCalendarSharedStatus::__construct |
( |
int |
$a_usr_id | ) |
|
◆ accept()
ilCalendarSharedStatus::accept |
( |
int |
$a_calendar_id | ) |
|
Definition at line 139 of file class.ilCalendarSharedStatus.php.
References $query, and $res.
141 self::deleteStatus($this->usr_id, $a_calendar_id);
142 $query =
"INSERT INTO cal_shared_status (cal_id,usr_id,status) " .
144 $this->db->quote($a_calendar_id,
'integer') .
", " .
145 $this->db->quote($this->usr_id,
'integer') .
", " .
146 $this->db->quote(self::STATUS_ACCEPTED,
'integer') .
" " .
150 $this->calendars[$a_calendar_id] = self::STATUS_ACCEPTED;
◆ decline()
ilCalendarSharedStatus::decline |
( |
int |
$a_calendar_id | ) |
|
Definition at line 153 of file class.ilCalendarSharedStatus.php.
References $query, and $res.
155 self::deleteStatus($this->usr_id, $a_calendar_id);
156 $query =
"INSERT INTO cal_shared_status (cal_id,usr_id,status) " .
158 $this->db->quote($a_calendar_id,
'integer') .
", " .
159 $this->db->quote($this->usr_id,
'integer') .
", " .
160 $this->db->quote(self::STATUS_DECLINED,
'integer') .
" " .
163 $this->calendars[$a_calendar_id] = self::STATUS_DECLINED;
◆ deleteCalendar()
static ilCalendarSharedStatus::deleteCalendar |
( |
int |
$a_calendar_id | ) |
|
|
static |
◆ deleteStatus()
static ilCalendarSharedStatus::deleteStatus |
( |
int |
$a_id, |
|
|
int |
$a_calendar_id |
|
) |
| |
|
static |
Definition at line 113 of file class.ilCalendarSharedStatus.php.
References $DIC, $ilDB, $query, $res, and ilObject\_lookupType().
Referenced by ilCalendarShared\stopSharing().
117 $ilDB = $DIC[
'ilDB'];
118 $rbacreview = $DIC[
'rbacreview'];
121 $query =
"DELETE FROM cal_shared_status " .
122 "WHERE cal_id = " .
$ilDB->quote($a_calendar_id,
'integer') .
" " .
123 "AND usr_id = " .
$ilDB->quote($a_id,
'integer') .
" ";
126 $assigned_users = $rbacreview->assignedUsers($a_id);
128 if (!count($assigned_users)) {
132 $query =
"DELETE FROM cal_shared_status " .
133 "WHERE cal_id = " .
$ilDB->quote($a_calendar_id,
'integer') .
" " .
134 "AND " .
$ilDB->in(
'usr_id', $assigned_users,
false,
'integer');
static _lookupType(int $id, bool $reference=false)
◆ deleteUser()
static ilCalendarSharedStatus::deleteUser |
( |
int |
$a_usr_id | ) |
|
|
static |
◆ getAcceptedCalendars()
static ilCalendarSharedStatus::getAcceptedCalendars |
( |
int |
$a_usr_id | ) |
|
|
static |
◆ getOpenInvitations()
ilCalendarSharedStatus::getOpenInvitations |
( |
| ) |
|
Definition at line 176 of file class.ilCalendarSharedStatus.php.
References $data, ilCalendarCategoryAssignments\_getAssignedAppointments(), ilCalendarShared\getSharedCalendarsForUser(), isAccepted(), and isDeclined().
Referenced by ilCalendarInboxSharedTableGUI\parse().
180 $invitations = array();
181 foreach ($shared as
$data) {
188 $invitations[] = array(
189 'cal_id' => (
int) $data[
'cal_id'],
190 'create_date' => $data[
'create_date'],
191 'obj_type' => $data[
'obj_type'],
192 'name' => $tmp_calendar->getTitle(),
193 'owner' => $tmp_calendar->getObjId(),
195 'accepted' => $this->
isAccepted((
int) $data[
'cal_id']),
196 'declined' => $this->
isDeclined((
int) $data[
'cal_id'])
Stores calendar categories.
isAccepted(int $a_cal_id)
static getSharedCalendarsForUser(int $a_usr_id=0)
static _getAssignedAppointments(array $a_cat_id)
Get assigned apointments.
isDeclined(int $a_cal_id)
◆ hasStatus()
static ilCalendarSharedStatus::hasStatus |
( |
int |
$a_usr_id, |
|
|
int |
$a_calendar_id |
|
) |
| |
|
static |
◆ isAccepted()
ilCalendarSharedStatus::isAccepted |
( |
int |
$a_cal_id | ) |
|
◆ isDeclined()
ilCalendarSharedStatus::isDeclined |
( |
int |
$a_cal_id | ) |
|
◆ read()
ilCalendarSharedStatus::read |
( |
| ) |
|
|
protected |
◆ $calendars
array ilCalendarSharedStatus::$calendars = array() |
|
private |
◆ $db
◆ $usr_id
int ilCalendarSharedStatus::$usr_id = 0 |
|
private |
◆ $writable
array ilCalendarSharedStatus::$writable = array() |
|
private |
◆ STATUS_ACCEPTED
const ilCalendarSharedStatus::STATUS_ACCEPTED = 1 |
◆ STATUS_DECLINED
const ilCalendarSharedStatus::STATUS_DECLINED = 2 |
◆ STATUS_DELETED
const ilCalendarSharedStatus::STATUS_DELETED = 3 |
The documentation for this class was generated from the following file: