Contentserv PHP API

CSActiveScriptContext
in package

A CSActiveScript Context is a contextual situation that a script should run in

Tags
since

CS16.1

access

public

Table of Contents

ACTION_TYPE_DOWNLOAD  = 1
ACTION_TYPE_ENUM  = array(self::ACTION_TYPE_DOWNLOAD)
CONTEXT_TYPE_MAM_FILE  = 4
CONTEXT_TYPE_PIM_PRODUCT  = 1
CONTEXT_TYPE_PIM_VIEW  = 2
CONTEXT_TYPE_UNKNOWN  = 0
__construct()  : mixed
CSActiveScriptContext constructor.
getAction()  : int
Returns the action for which the active script context is defined.
getContextClassName()  : string
Returns the CS database record class name for the context type
getContextObject()  : Record
Can be used to retrieve the context object for a given ID
getContextObjects()  : array<string|int, Record>
Can be used to retrieve all of the context objects
getIDs()  : array<string|int, int>
Tells the IDs for the context type that the context reflect
getType()  : int
Tells the data type of the context
setAction()  : void
Sets the action for which the active script context is defined.

Constants

Methods

__construct()

CSActiveScriptContext constructor.

public __construct(int $iType[, array<string|int, int> $aIDs = array() ]) : mixed
Parameters
$iType : int

the type as one of the CONTEXT_TYPE_* constants

$aIDs : array<string|int, int> = array()

optional array of IDs for the type

Tags
Return values
mixed

getAction()

Returns the action for which the active script context is defined.

public getAction() : int
Tags
access

public

Return values
int

The action type as one of the ACTION_TYPE_-constants.

getContextClassName()

Returns the CS database record class name for the context type

public getContextClassName() : string
Tags
access

public

Return values
string

the class name of the context

getContextObject()

Can be used to retrieve the context object for a given ID

public getContextObject(int $iID) : Record
Parameters
$iID : int

the ID of the object

Tags
Return values
Record

the context object

getContextObjects()

Can be used to retrieve all of the context objects

public getContextObjects([bool $bRecursive = true ]) : array<string|int, Record>
Parameters
$bRecursive : bool = true

if true, also the children will be returned for tree types

Tags
Return values
array<string|int, Record>

array with context objects

getIDs()

Tells the IDs for the context type that the context reflect

public getIDs() : array<string|int, int>
Tags
access

public

Return values
array<string|int, int>

array with the IDs of the context type

getType()

Tells the data type of the context

public getType() : int
Tags
access

public

Return values
int

the type as one of the CONTEXT_TYPE_* constants

setAction()

Sets the action for which the active script context is defined.

public setAction(int $iAction) : void
Parameters
$iAction : int

The action type as one of the ACTION_TYPE_-constants

Tags
access

public

Return values
void

        

Search results