Contentserv PHP API

CSPortal
in package

Tags

Table of Contents

createFrameworkFileForFiles()  : string
Creates one framework file which contains the content from multiple files and replaces skin placeholders.
createPortal()  : CSPortalPortal
Creates and returns a new Portal object in the main memory
createTab()  : CSPortalTab
Creates and returns a new Tab object in the main memory
createWidget()  : CSPortalWidget
Creates and returns a new Widget object in the main memory
getAvailableStudioWidgetTypes()  : array<string|int, CSStudio>
Returns available studios.
getPortal()  : CSPortalPortal
Loads and returns a CSPortalPortal Object
getPortals()  : array<string|int, CSPortalPortal>
Loads and returns a list of CSPortalPortal Objects
getTab()  : CSPortalTab
Loads and returns a CSPortalTab Object
getTabs()  : array<string|int, mixed>
Loads and returns a list of CSPortalTab Objects
getUserPortals()  : array<string|int, CSPortalPortal>
Loads a list with portal objects available for a given user
getVisiblePortals()  : array<string|int, CSPortalPortal>
Loads and returns a list of CSPortalPortal Objects
getWidget()  : CSPortalWidget
Loads and returns a CSPortalWidget Object
getWidgetMetaData()  : array<string|int, mixed>
Loads the meta data from a UWA file
getWidgetPreferences()  : array<string|int, mixed>
Loads the preferences from a UWA file
getWidgets()  : array<string|int, mixed>
Loads and returns a list of CSPortalWidget Objects
guessAcceptLanguage()  : string
Guess the language accepted from the client by reading the Accept-Language header
initDeepLink()  : mixed
Initializes the Portal framework for a given PortalWidgetID
loadWidget()  : CSWidget
Instantiates a CSWidgets plugin for a given widget to be able to use it in the current context The Plugin is loaded and registered as current instance in the CSWidget::getInstance() method If another plugin with a different ID had been registered before the method returns false

Methods

createFrameworkFileForFiles()

Creates one framework file which contains the content from multiple files and replaces skin placeholders.

public static createFrameworkFileForFiles(array<string|int, mixed> $aFiles, string $sContext[, string $sTargetFileType = 'css' ]) : string

At the moment the method supports only "CSS" file type!

Parameters
$aFiles : array<string|int, mixed>

The files which should be combined.

$sContext : string

The current context of the framework file.

$sTargetFileType : string = 'css'

The target file type of the framework file.

Tags
Return values
string

with the cache file path to the framework file.

createPortal()

Creates and returns a new Portal object in the main memory

public static createPortal(string $Title) : CSPortalPortal

If you want to keep this portal you have to call the store method on the returned portal

Parameters
$Title : string

the title of the new portal

Tags
access

public

Return values
CSPortalPortal

createTab()

Creates and returns a new Tab object in the main memory

public static createTab(int $PortalPortalID, string $Title) : CSPortalTab

If you want to keep this tab you have to call the store method on the returned tab

Parameters
$PortalPortalID : int

the id of the portal this tab should belong to

$Title : string

the title of the new tab

Tags
access

public

Return values
CSPortalTab

createWidget()

Creates and returns a new Widget object in the main memory

public static createWidget(int $PortalTabID, string $Title) : CSPortalWidget

If you want to keep this widget you have to call the store method on the returned widget

Parameters
$PortalTabID : int

the id of the tab this widget should belong to

$Title : string

the title of the new widget

Tags
access

public

Return values
CSPortalWidget

getAvailableStudioWidgetTypes()

Returns available studios.

public static getAvailableStudioWidgetTypes([bool $bCheckRights = true ]) : array<string|int, CSStudio>
Parameters
$bCheckRights : bool = true
Tags
Return values
array<string|int, CSStudio>

An array with the studio API objects.

getPortal()

Loads and returns a CSPortalPortal Object

public static getPortal(int $PortalPortalID) : CSPortalPortal
Parameters
$PortalPortalID : int

the id of the portal

Tags
access

public

Return values
CSPortalPortal

getPortals()

Loads and returns a list of CSPortalPortal Objects

public static getPortals(string $filter[, mixed $sortOrder = '' ]) : array<string|int, CSPortalPortal>
Parameters
$filter : string

sql where filter condition matching the portal table

$sortOrder : mixed = ''
Tags
access

public

Return values
array<string|int, CSPortalPortal>

objects

getTab()

Loads and returns a CSPortalTab Object

public static getTab(int $PortalTabID) : CSPortalTab
Parameters
$PortalTabID : int

the id of the tab

Tags
access

public

Return values
CSPortalTab

getTabs()

Loads and returns a list of CSPortalTab Objects

public static getTabs(string $filter) : array<string|int, mixed>
Parameters
$filter : string

sql where filter condition matching the tab table

Tags
access

public

Return values
array<string|int, mixed>

with CSPortalTab objects

getUserPortals()

Loads a list with portal objects available for a given user

public static getUserPortals([int $UserID = null ]) : array<string|int, CSPortalPortal>
Parameters
$UserID : int = null

the id of the owner of the portals, if not provided the current user is used

Tags
access

public

Return values
array<string|int, CSPortalPortal>

array with CSPortalPortal objects

getVisiblePortals()

Loads and returns a list of CSPortalPortal Objects

public static getVisiblePortals([int $UserID = null ]) : array<string|int, CSPortalPortal>
Parameters
$UserID : int = null
Tags
access

public

Return values
array<string|int, CSPortalPortal>

with CSPortalPortal objects

getWidget()

Loads and returns a CSPortalWidget Object

public static getWidget(int $PortalWidgetID) : CSPortalWidget
Parameters
$PortalWidgetID : int

the id of the widget

Tags
access

public

Return values
CSPortalWidget

getWidgetMetaData()

Loads the meta data from a UWA file

public static getWidgetMetaData(mixed $uwaURL) : array<string|int, mixed>
Parameters
$uwaURL : mixed
Tags
access

public

throws
CSException

If a netvibes UWA path is given, because it is no longer supported.

Return values
array<string|int, mixed>

with CSWidgetMetaData objects

getWidgetPreferences()

Loads the preferences from a UWA file

public static getWidgetPreferences(mixed $uwaURL) : array<string|int, mixed>
Parameters
$uwaURL : mixed
Tags
access

public

throws
CSException

If a netvibes UWA path is given, because it is no longer supported.

Return values
array<string|int, mixed>

with CSWidgetPreference objects

getWidgets()

Loads and returns a list of CSPortalWidget Objects

public static getWidgets([int $PortalTabID = null ][, int $col = null ][, string $filter = null ]) : array<string|int, mixed>
Parameters
$PortalTabID : int = null

Tab ID of the tab

$col : int = null

number of the col of the widget starting from 1

$filter : string = null

sql where filter condition matching the widget table

Tags
access

public

Return values
array<string|int, mixed>

with CSPortalWidget objects

guessAcceptLanguage()

Guess the language accepted from the client by reading the Accept-Language header

public static guessAcceptLanguage() : string
Tags
access

public

Return values
string

The language short name like en or de. If none of the known languages is found the projects default language is returned.

Initializes the Portal framework for a given PortalWidgetID

public static initDeepLink() : mixed

The PortalWidgetID must be passed as GET request variable. If given the portal and tab of this widget is loaded.

If a PortalNavigationID is passed in the URL, it is opened in the widget If PortalNavigationParameters are passed (url encoded parameters) they are added as parameters to the widget

e.g. admin/portal.php?PortalWidgetID=195&PortalNavigationID=collection@5 or with additional paramters a=b and c=d: admin/portal.php?PortalWidgetID=195&PortalNavigationID=collection@5&PortalNavigationParameters=a%3Db%26c%3Dd

Tags
Return values
mixed

loadWidget()

Instantiates a CSWidgets plugin for a given widget to be able to use it in the current context The Plugin is loaded and registered as current instance in the CSWidget::getInstance() method If another plugin with a different ID had been registered before the method returns false

public loadWidget(mixed $widgetID) : CSWidget
Parameters
$widgetID : mixed

the ID of the current widget

Tags
Return values
CSWidget

the current widget instance or false, if any error had been occured


        

Search results