Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
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

static close ( )
static

"Close" the current context

static get ( )
static

Return sorm-object of currently active Stud.IP object

Returns
Course|Institute sorm-object of current context
static getArtNum ( )
static

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

Returns
int
static getClass ( )
static

Get string representation of object-type fpr legacy support

Returns
string returns 'sem' or 'inst'
static getHeaderLine ( )
static

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

Returns
string or null if no context is available
static getId ( )
static

Return id of currently active Stud.IP object

Returns
string md5-hash
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
static getTypeName ( )
static

Return human readable text for current context, excluding user

Returns
string
static isCourse ( )
static

Checks if current context is a seminar

Returns
bool
static isInstitute ( )
static

Checks if current context is an institute

Returns
bool
static isUser ( )
static

Checks if current context is an user

Returns
bool
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

const COURSE = 'course'

Constants to check for type of context

const INSTITUTE = 'institute'
const USER = 'user'

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