Stud.IP  6.0
InstituteCalendarHelper Class Reference

Static Public Member Functions

static getResourceColumns ($institut_id, $only_visible=false)
 
static addDefaultResourceColumns ($institut_id)
 
static addResourceColumn ($institut_id, $name, $specific_column_number=0)
 
static getCourseEventcolumns (Course $course)
 
static setCourseEventcolumn ($course, $event_id, $institut_id, $column)
 
static getCourseEventcolors ($course)
 
static setCourseEventcolor ($course, $event_id, $institut_id, $color)
 
static getInstituteDefaultEventcolors ($context)
 
static setInstituteDefaultEventcolor ($context, $semtype, $color)
 
static setSemtypeEventcolor ($course, $institut_id, $color)
 
static getEventlessCourses ($courses, $semester=null)
 
static getEvents ($courses, $institut_id, $semester=null, $specific_weekday=null)
 
static getCycleEvent ($cycle_date, $institut_id)
 
static getBackgroundEvents ($start=null)
 

Data Fields

const COLUMN_DATAFIELD_ID = '69f6485f3c937766866a03d9d642ecbb'
 
const COLOR_DATAFIELD_ID = '41cda2be71fe9efd6e28b853fc0681f3'
 
const INST_DEFAULT_COLOR_DATAFIELD_ID = '0c63321a8e93b3ccc927611709248e07'
 
const DEFAULT_EVENT_COLOR = '#899ab9'
 

Member Function Documentation

◆ addDefaultResourceColumns()

static addDefaultResourceColumns (   $institut_id)
static

Adds the default resource columns

Parameters
string$institut_id
Returns
int last resource column number

◆ addResourceColumn()

static addResourceColumn (   $institut_id,
  $name,
  $specific_column_number = 0 
)
static

Adds a resource column

Parameters
string$institut_id
string$name
int$specific_column_number
Returns
int number of affected rows

◆ getBackgroundEvents()

static getBackgroundEvents (   $start = null)
static

◆ getCourseEventcolors()

static getCourseEventcolors (   $course)
static

Looks up color value for course events

Parameters
Course$course
Returns
array course events with color value

◆ getCourseEventcolumns()

static getCourseEventcolumns ( Course  $course)
static

Looks up column id for course events

Parameters
Course$course
Returns
array course events with column id

◆ getCycleEvent()

static getCycleEvent (   $cycle_date,
  $institut_id 
)
static

Creates a fullcalendar event of given SeminarCycleDate

Parameters
SeminarCycleDate$cycle_date
string$institut_id
Returns
array enriched course info string for tooltip

◆ getEventlessCourses()

static getEventlessCourses (   $courses,
  $semester = null 
)
static

Prepares an array of course id and names for creation of dropable calendar events

Parameters
array$coursesArray of courses
array$semesterSemester
Returns
array prepared array

◆ getEvents()

static getEvents (   $courses,
  $institut_id,
  $semester = null,
  $specific_weekday = null 
)
static

Creates FullCalendar event date of course events

Parameters
array$coursesArray of courses
string$institut_id
array$semesterSemester
array$specific_weekdayfetch only events for specific weekday
Returns
array fullcalendar events

◆ getInstituteDefaultEventcolors()

static getInstituteDefaultEventcolors (   $context)
static

Looks up default color value for institute course events

Parameters
SimpleORMap$context
Returns
array course events with color value

◆ getResourceColumns()

static getResourceColumns (   $institut_id,
  $only_visible = false 
)
static

Fetches the stores columns merged with defaults.

Parameters
string$institut_id
boolean$only_visibleonly return visible columns
Returns
array column array in a fullcalender expected format

◆ setCourseEventcolor()

static setCourseEventcolor (   $course,
  $event_id,
  $institut_id,
  $color 
)
static

Sets color value for course events

Parameters
Course$course
string$event_idSeminarCycleDate id
string$institut_id
string$colorcolorcode
Returns
bool stored

◆ setCourseEventcolumn()

static setCourseEventcolumn (   $course,
  $event_id,
  $institut_id,
  $column 
)
static

Sets the column id for course events

Parameters
Course$course
string$event_idSeminarCycleDate id
string$institut_id
string$columnnumber of the column
Returns
bool stored

◆ setInstituteDefaultEventcolor()

static setInstituteDefaultEventcolor (   $context,
  $semtype,
  $color 
)
static

Sets default institute course events color value for semtypes

Parameters
SimpleORMap$context
string$semtype
string$colorcolorcode
Returns
bool stored

◆ setSemtypeEventcolor()

static setSemtypeEventcolor (   $course,
  $institut_id,
  $color 
)
static

Sets color value for every course events of given courses semtype

Parameters
Course$course
string$institut_id
string$colorcolorcode
Returns
bool stored

Field Documentation

◆ COLOR_DATAFIELD_ID

const COLOR_DATAFIELD_ID = '41cda2be71fe9efd6e28b853fc0681f3'

◆ COLUMN_DATAFIELD_ID

const COLUMN_DATAFIELD_ID = '69f6485f3c937766866a03d9d642ecbb'

◆ DEFAULT_EVENT_COLOR

const DEFAULT_EVENT_COLOR = '#899ab9'

◆ INST_DEFAULT_COLOR_DATAFIELD_ID

const INST_DEFAULT_COLOR_DATAFIELD_ID = '0c63321a8e93b3ccc927611709248e07'

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