Stud.IP  6.0
Context Class Reference

Static Public Member Functions

static get ()
 
static getId ()
 
static getType ()
 
static isCourse ()
 
static isInstitute ()
 
static isUser ()
 
static getClass ()
 
static getArtNum ()
 
static getTypeName ()
 
static getHeaderLine ()
 
static set ($id)
 
static close ()
 

Data Fields

const COURSE = 'course'
 
const INSTITUTE = 'institute'
 
const USER = 'user'
 

Member Function Documentation

◆ close()

static close ( )
static

"Close" the current context

◆ get()

static get ( )
static

Return sorm-object of currently active Stud.IP object

Returns
Course|Institute sorm-object of current context

◆ getArtNum()

static getArtNum ( )
static

Get SemClass-number (kind of) for current context. Only works for seminar or institute

Returns
int

◆ getClass()

static getClass ( )
static

Get string representation of object-type fpr legacy support

Returns
string returns 'sem' or 'inst'

◆ getHeaderLine()

static getHeaderLine ( )
static

Get Fullname of current context, to use it in the context-title

Returns
string or null if no context is available

◆ getId()

static getId ( )
static

Return id of currently active Stud.IP object

Returns
string md5-hash

◆ getType()

static getType ( )
static

Return type of currently active Stud.IP object. To easily check what type of object that is, check the return value against Context::COURSE, Context::INSTITUTE or Context::USER

Returns
mixed one of Context::COURSE, Context::INSTITUTE or Context::USER

◆ getTypeName()

static getTypeName ( )
static

Return human readable text for current context, excluding user

Returns
string

◆ isCourse()

static isCourse ( )
static

Checks if current context is a seminar

Returns
bool

◆ isInstitute()

static isInstitute ( )
static

Checks if current context is an institute

Returns
bool

◆ isUser()

static isUser ( )
static

Checks if current context is an user

Returns
bool

◆ set()

static set (   $id)
static

Set the context to the object denoted by the passed id. Usually there is no need to call this on your own, since seminar_open already does this for you!

Parameters
string$id
Exceptions
AccessDeniedException

Field Documentation

◆ COURSE

const COURSE = 'course'

Constants to check for type of context

◆ INSTITUTE

const INSTITUTE = 'institute'

◆ USER

const USER = 'user'

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