Stud.IP  4.2 Revision
Context Class Reference
Collaboration diagram for Context:
Collaboration graph

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get()

static get ( )
static

Return sorm-object of currently active Stud.IP object

Returns
Course|Institute sorm-object of current context
Here is the caller graph for this function:

◆ getArtNum()

static getArtNum ( )
static

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

Deprecated:
Returns
int
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getClass()

static getClass ( )
static

Get string representation of object-type fpr legacy support

Deprecated:
Returns
string returns 'sem' or 'inst'
Here is the caller graph for this function:

◆ getHeaderLine()

static getHeaderLine ( )
static

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

Returns
string or null if no context is available
Here is the caller graph for this function:

◆ getId()

static getId ( )
static

Return id of currently active Stud.IP object

Returns
string md5-hash
Here is the caller graph for this function:

◆ 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

Deprecated:
Returns
string

◆ isCourse()

static isCourse ( )
static

Checks if current context is a seminar

Returns
bool
Here is the caller graph for this function:

◆ isInstitute()

static isInstitute ( )
static

Checks if current context is an institute

Returns
bool
Here is the caller graph for this function:

◆ 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
Here is the call graph for this function:
Here is the caller graph for this function:

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: