Contentserv PHP API

CSGuiSwitchPane extends CSGuiTabbedPane
in package

The CSGuiSwitchPane creates a typical tabbed pane area with buttons on the left side

To create a CSGuiSwitchPane object call the method and work with the return value. The constructor itself is private in order to support SkinManagement.

Tags
see
CSGuiPane
see
CSGuiTabbedPane
see
CSGuiSectionPane
see
CSGuiTreePane
since
4.2.1

Table of Contents

$additionalHtml  : mixed
$isDisabled  : mixed
$isPortal  : mixed
$pane  : mixed
$popup  : mixed
$popupIDField  : mixed
$popupUrl  : mixed
__construct()  : mixed
CSGuiTabbedPane constructor.
addButton()  : html
Adds a button to the vertical toolbar of all tabs
addCheckboxButton()  : CSGuiToolbarButton
Adds a checkbox button to the toolbar
addComponent()  : void
Adds an arbitrary html code to the vertical toolbar of all tabs
addContent()  : void
Adds content to the current tab pane or before the tab pane
addControl()  : SectionPaneSection
Adds a sub pane with a content which is visible for all tabs
addCSSCode()  : void
Adds a css snippet to the windows internal css code as they are used in the head Note that links to urls within the file must be relative to the forward.php
addCSSLink()  : void
Adds a link to the windows external cascading style sheets Note that - that the admin.css is included by default - the link to the file is from the browsers point of view relative to the forward.php - that links to urls within the file are relative to the css file location.
addIFrameControl()  : SectionPaneSection
Adds a special sub pane that contains an iframe and is visible for all tabs
addJSAPI()  : void
Preloads a js API library instead of using CS.loadAPI in the code
addJSCode()  : void
Adds a js code snippet to the windows internal js scripts as they are used in the head or directly to the component
addJSLink()  : void
Adds a link to the windows external js scripts Note that the link to the file is from the browsers point of view relative to the forward.php
addJSUtils()  : void
Preloads a js util library instead of using CS.loadUtils in the code
addPaneButton()  : html
Adds a button to the vertical toolbar of the current tab
addPaneCheckboxButton()  : CSGuiToolbarButton
Adds a checkbox button to the toolbar of the current tab
addPaneComponent()  : void
Adds an arbitrary html code to the vertical toolbar of the current tab
addPaneControl()  : void
Adds a sub pane with a content which is visible for the current tab
addPaneIFrameControl()  : void
Adds a special sub pane that contains an iframe and is visible the current tab
addPaneSeparator()  : void
Adds a toolbar separator to the vertical toolbar of the current tab
addPaneToggleButton()  : CSGuiToolbarButton
Adds a toggle button to the toolbar of the current tab
addSeparator()  : void
Adds a toolbar separator to the vertical toolbar of all tabs
addToggleButton()  : CSGuiToolbarButton
Adds a toggle button to the toolbar
closeOldIframes()  : mixed
Defines whether other iframes should be removed, if another iframe is opened. This may be usefull, if one frame contains content which might disturb other frames
enableJQuery()  : void
Enables JQuery by loading all required libraries
enableJQueryEasy()  : void
Enables JQuery easy by loading all required libraries (experimental only)
enableJQueryPlugin()  : bool
Enables jQuery plugin.
enableJQueryUI()  : void
Enables JQuery UI by loading all required libraries (experimental only)
enableLoadOnDemandContent()  : mixed
Defines the pane to load iframes and images not before a pane is shown.
enablePluginCalls()  : mixed
Enables / disables all calls to CSGuiComponent plugins, if it is not wanted
endPane()  : mixed
finishes the outputbuffering for the current tab
getController()  : object
returns the controller of this gui component
getControlPaneVisible()  : bool
Gets the visibility of the control pane if controls have been definied
getStartTab()  : string
Gets the tab which should be opened at start
hideSingleTab()  : void
if set to true, the tab bar is hidden if the pane only has one tab button
isPortal()  : bool
Returns whether the component is used in the portal
makeForwardUrl()  : mixed
makeHtml()  : string
Outputs the complete pane and stops output buffering
popupAddCheckboxItem()  : void
Adds a checkbox popup item to the end of the current component's popup
popupAddItem()  : void
Adds a popup item to the end of the current component's popup
popupAddJavascriptFunction()  : void
Adds a Javascript method to the components Javascript which can be used to display a popup.
popupAddSeparator()  : void
Adds a popup separator item to the end of the current component's popup
popupAddSubMenuDefinition()  : void
Adds a definition (Icon, GroupIdentifier, GroupIndex) for a sub menu entry.
popupEnableDebugMode()  : mixed
popupEvaluateCode()  : mixed
Provides a condition which must be true if the popup item should be available
popupGetJavascript()  : string
Creates a javascript onContext='...' code, which can be inserted in a html component
popupGetMultipleRequestID()  : bool
This function may be used to check whether the request is a popupRequest for multiple elements.
popupGetRequestID()  : string
If a user request a popup the id describing the kind of request is returned here This function may also be used to check whether the request is a popupRequest.
popupInsertItem()  : void
Adds a popup item into a specified location of the current component's popup
popupMakeHtml()  : mixed
Creates the final popup html code
popupRemoveAllItems()  : void
Completely removes all popup items from the component
popupRemoveItem()  : void
Remove one items from the popup for the component
popupRemoveItemsByNamespace()  : void
Remove multiple from the popup specified by the namespace. All items having all the passed namespaces will be removed even if they are having more than the passed.
popupSetCharset()  : string
Sets the encoding for the popup components
popupSetDefaultPopup()  : void
Sets the default popup for the component
popupSetRequestID()  : void
Overwrites the id returned by popupSetRequestID
popupSetUrl()  : void
Changes the url where the popup should be loaded from.
popupSetVisible()  : void
Enables or disables the visiblity of the popup.
popupUseDefaultItem()  : void
Adds a standard popup item to the end of the current component's popup
removePane()  : void
removes the pane with the specified title
setController()  : void
sets the controller for the gui component
setControlPaneState()  : void
Sets the state of the control pane
setControlPaneVisible()  : void
Sets the visibility of the control pane if controls have been definied
setForceDefaultStatesControl()  : void
Sets whether the default states should be restored in the control pane after a reload or may be loaded from a cookie
setPaneID()  : void
Sets the ID for the CSGuiPane
setPaneLabel()  : void
Sets the label of the current tab, if a tab has been opened.
setPortalMode()  : void
Sets the component to the browsers portal
setRightTitle()  : void
Sets the right caption for the TabbedPane
setStartTab()  : void
Defines the tab which should be opened at start
showOnlyIcons()  : void
if set to true, the tab bar titles show only the icons if given
throwError()  : void
Throws a CSException

Properties

$additionalHtml

public mixed $additionalHtml = ''
Tags
access

private

$isDisabled

public mixed $isDisabled = \false
Tags
access

private

$pane

public mixed $pane
Tags
access

private

Methods

__construct()

CSGuiTabbedPane constructor.

public __construct([mixed $id = 'default' ]) : mixed
Parameters
$id : mixed = 'default'
Tags
Return values
mixed

addButton()

Adds a button to the vertical toolbar of all tabs

public addButton(string $image, string $title[, string $href = '#' ][, string $target = '_self' ][, string $onclick = '' ][, string $accesskey = '' ][, string $id = '' ][, string $visibility = '' ]) : html
Parameters
$image : string

the image of the button relative to the admin/images/toolbar or in case of the CSGUI_TOOLBAR_TYPE_VERTICAL or CSGUI_TOOLBAR_TYPE_HORIZONTAL relative to the admin/images/popup directory

$title : string

the text or tooltip title of the button

$href : string = '#'

the link of the button

$target : string = '_self'

the target of the link of the button

$onclick : string = ''

javascript code to be evaluated onClick

$accesskey : string = ''

the keybord accelerator to navigate to the button with the alt key

$id : string = ''

an optional id of the toolbar if you want to use more than one toolbar at the same time

$visibility : string = ''

the visibility with the form GROUP:NAME (@see CSGuiToolbar)

Tags
access

public

Return values
html

the html representation of the toolbar

addCheckboxButton()

Adds a checkbox button to the toolbar

public addCheckboxButton(string $image, array<string|int, mixed> $titles[, array<string|int, mixed> $hrefs = array('#') ][, array<string|int, mixed> $targets = array('_self') ][, array<string|int, mixed> $onclicks = array('') ][, bool $defaultState = true ][, string $accesskey = '' ][, string $id = '' ][, string $visibility = '' ][, string $groupName = '' ]) : CSGuiToolbarButton
Parameters
$image : string

the images of the button relative to the admin/images/toolbar or in case of the CSGUI_TOOLBAR_TYPE_VERTICAL or CSGUI_TOOLBAR_TYPE_HORIZONTAL relative to the admin/images/popup directory

$titles : array<string|int, mixed>

the text or tooltip title of the button

$hrefs : array<string|int, mixed> = array('#')

the links of the button

$targets : array<string|int, mixed> = array('_self')

the targets of the link of the button

$onclicks : array<string|int, mixed> = array('')

javascript code to be evaluated onClick if this javascript functions return the boolean value 'false' the button toggle is canceld

$defaultState : bool = true

the default state of the button (true => first state is used, false => second state is used)

$accesskey : string = ''

the keybord accelerator to navigate to the button with the alt key

$id : string = ''

an optional id of the toolbar if you want to use more than one toolbar at the same time

$visibility : string = ''

the visibility with the form GROUP:NAME

$groupName : string = ''

a string with a group name. Only one button of a group can be active at the same time

Tags
access

public

Return values
CSGuiToolbarButton

the created button object

addComponent()

Adds an arbitrary html code to the vertical toolbar of all tabs

public addComponent(string $html[, string $title = "&nbsp;" ][, string $visibility = '' ]) : void
Parameters
$html : string

the code to be added

$title : string = "&nbsp;"

the text or tooltip title of the button

$visibility : string = ''

the visibility with the form GROUP:NAME (@see CSGuiToolbar)

Tags
access

public

Return values
void

addContent()

Adds content to the current tab pane or before the tab pane

public addContent(string $html) : void
Parameters
$html : string

content to be added

Tags
access

public

Return values
void

addControl()

Adds a sub pane with a content which is visible for all tabs

public addControl(string $title, string $content[, string $onClick = '' ][, bool $defaultState = false ][, string $visibility = '' ]) : SectionPaneSection
Parameters
$title : string

the label of the pane

$content : string

the content to be displayed in the controlframe

$onClick : string = ''

javascript code to be evaluated onClick

$defaultState : bool = false

if true the sub section will be opened by default

$visibility : string = ''

the visibility with the form GROUP:NAME (@see CSGuiToolbar)

Tags
access

public

Return values
SectionPaneSection

addCSSCode()

Adds a css snippet to the windows internal css code as they are used in the head Note that links to urls within the file must be relative to the forward.php

public addCSSCode(string $sCode) : void
Parameters
$sCode : string

the code of the css without any <style> elements

Tags
access

public

Return values
void

Adds a link to the windows external cascading style sheets Note that - that the admin.css is included by default - the link to the file is from the browsers point of view relative to the forward.php - that links to urls within the file are relative to the css file location.

public addCSSLink(string $sCsslink) : void
Parameters
$sCsslink : string

the href of the css file

Tags
access

public

Return values
void

addIFrameControl()

Adds a special sub pane that contains an iframe and is visible for all tabs

public addIFrameControl(string $title, string $src[, string $onClick = '' ][, bool $defaultState = false ][, string $height = '400px' ][, string $visibility = '' ]) : SectionPaneSection

The iframe fills automatially the complete pane area. The src of the iframe is loaded as soon as the sub pane area becomes visible, which is onClick or maybe automatically at reload.

Parameters
$title : string

the label of the pane

$src : string

the url of the pane

$onClick : string = ''

additional javascript code to be evaluated onClick

$defaultState : bool = false

if true the sub section will be opened by default

$height : string = '400px'

the height of the frame

$visibility : string = ''

the visibility with the form GROUP:NAME (@see CSGuiToolbar)

Tags
access

public

Return values
SectionPaneSection

addJSAPI()

Preloads a js API library instead of using CS.loadAPI in the code

public addJSAPI(string $api) : void
Parameters
$api : string

the name of the CS API library in the ../admin/modules/[MODULE]/CS[MODULE].js directory

Tags
access

public

Return values
void

addJSCode()

Adds a js code snippet to the windows internal js scripts as they are used in the head or directly to the component

public addJSCode(string $sCode) : void
Parameters
$sCode : string

the code of the js without any <javasctipt> elements

Tags
access

public

Return values
void

Adds a link to the windows external js scripts Note that the link to the file is from the browsers point of view relative to the forward.php

public addJSLink(string $sHref) : void
Parameters
$sHref : string

the href of the js

Tags
access

public

Return values
void

addJSUtils()

Preloads a js util library instead of using CS.loadUtils in the code

public addJSUtils(string $util) : void
Parameters
$util : string

the name of the CS Util library in the ../admin/core/utils/js/ directory

Tags
access

public

Return values
void

addPaneButton()

Adds a button to the vertical toolbar of the current tab

public addPaneButton(string $image, string $title[, string $href = '#' ][, string $target = '_self' ][, string $onclick = '' ][, string $accesskey = '' ][, string $id = '' ]) : html
Parameters
$image : string

the image of the button relative to the admin/images/toolbar or in case of the CSGUI_TOOLBAR_TYPE_VERTICAL or CSGUI_TOOLBAR_TYPE_HORIZONTAL relative to the admin/images/popup directory

$title : string

the text or tooltip title of the button

$href : string = '#'

the link of the button

$target : string = '_self'

the target of the link of the button

$onclick : string = ''

javascript code to be evaluated onClick

$accesskey : string = ''

the keybord accelerator to navigate to the button with the alt key

$id : string = ''

an optional id of the toolbar if you want to use more than one toolbar at the same time

Tags
access

public

Return values
html

the html representation of the toolbar

addPaneCheckboxButton()

Adds a checkbox button to the toolbar of the current tab

public addPaneCheckboxButton(string $image, array<string|int, mixed> $titles[, array<string|int, mixed> $hrefs = array('#') ][, array<string|int, mixed> $targets = array('_self') ][, array<string|int, mixed> $onclicks = array('') ][, bool $defaultState = true ][, string $accesskey = '' ][, string $id = '' ][, mixed $groupName = '' ]) : CSGuiToolbarButton
Parameters
$image : string

the images of the button relative to the admin/images/toolbar or in case of the CSGUI_TOOLBAR_TYPE_VERTICAL or CSGUI_TOOLBAR_TYPE_HORIZONTAL relative to the admin/images/popup directory

$titles : array<string|int, mixed>

the text or tooltip title of the button

$hrefs : array<string|int, mixed> = array('#')

the links of the button

$targets : array<string|int, mixed> = array('_self')

the targets of the link of the button

$onclicks : array<string|int, mixed> = array('')

javascript code to be evaluated onClick if this javascript functions return the boolean value 'false' the button toggle is canceld

$defaultState : bool = true

the default state of the button (true => first state is used, false => second state is used)

$accesskey : string = ''

the keybord accelerator to navigate to the button with the alt key

$id : string = ''

an optional id of the toolbar if you want to use more than one toolbar at the same time

$groupName : mixed = ''
Tags
access

public

Return values
CSGuiToolbarButton

the created button object

addPaneComponent()

Adds an arbitrary html code to the vertical toolbar of the current tab

public addPaneComponent(string $html[, string $title = "&nbsp;" ]) : void
Parameters
$html : string

the code to be added

$title : string = "&nbsp;"

the text or tooltip title of the button

Tags
access

public

Return values
void

addPaneControl()

Adds a sub pane with a content which is visible for the current tab

public addPaneControl(string $title, string $content[, string $onClick = '' ][, bool $defaultState = false ]) : void
Parameters
$title : string

the label of the pane

$content : string

the content to be displayed in the controlframe

$onClick : string = ''

javascript code to be evaluated onClick

$defaultState : bool = false

if true the sub section will be opened by default

Tags
access

public

Return values
void

addPaneIFrameControl()

Adds a special sub pane that contains an iframe and is visible the current tab

public addPaneIFrameControl(string $title, string $src[, string $onClick = '' ][, bool $defaultState = false ][, string $height = '400px' ]) : void

The iframe fills automatially the complete pane area. The src of the iframe is loaded as soon as the sub pane area becomes visible, which is onClick or maybe automatically at reload.

Parameters
$title : string

the label of the pane

$src : string

the url of the pane

$onClick : string = ''

additional javascript code to be evaluated onClick

$defaultState : bool = false

if true the sub section will be opened by default

$height : string = '400px'

the height of the frame

Tags
access

public

Return values
void

addPaneSeparator()

Adds a toolbar separator to the vertical toolbar of the current tab

public addPaneSeparator() : void
Tags
access

public

Return values
void

addPaneToggleButton()

Adds a toggle button to the toolbar of the current tab

public addPaneToggleButton(array<string|int, mixed> $images, array<string|int, mixed> $titles[, array<string|int, mixed> $hrefs = array('#') ][, array<string|int, mixed> $targets = array('_self') ][, array<string|int, mixed> $onclicks = array('') ][, bool $defaultState = true ][, string $accesskey = '' ][, string $id = '' ]) : CSGuiToolbarButton
Parameters
$images : array<string|int, mixed>

the images of the button relative to the admin/images/toolbar or in case of the CSGUI_TOOLBAR_TYPE_VERTICAL or CSGUI_TOOLBAR_TYPE_HORIZONTAL relative to the admin/images/popup directory

$titles : array<string|int, mixed>

the text or tooltip title of the button

$hrefs : array<string|int, mixed> = array('#')

the links of the button

$targets : array<string|int, mixed> = array('_self')

the targets of the link of the button

$onclicks : array<string|int, mixed> = array('')

javascript code to be evaluated onClick if this javascript functions return the boolean value 'false' the button toggle is canceld

$defaultState : bool = true

the default state of the button (true => first state is used, false => second state is used)

$accesskey : string = ''

the keybord accelerator to navigate to the button with the alt key

$id : string = ''

an optional id of the toolbar if you want to use more than one toolbar at the same time

Tags
access

public

Return values
CSGuiToolbarButton

the created button object

addSeparator()

Adds a toolbar separator to the vertical toolbar of all tabs

public addSeparator([string $visibility = '' ]) : void
Parameters
$visibility : string = ''

the visibility with the form GROUP:NAME (@see CSGuiToolbar)

Tags
access

public

Return values
void

addToggleButton()

Adds a toggle button to the toolbar

public addToggleButton(array<string|int, mixed> $images, array<string|int, mixed> $titles[, array<string|int, mixed> $hrefs = array('#') ][, mixed $target = array('_self') ][, mixed $onclick = array('') ][, bool $defaultState = true ][, string $accesskey = '' ][, string $id = '' ][, string $visibility = '' ]) : CSGuiToolbarButton
Parameters
$images : array<string|int, mixed>

the images of the button relative to the admin/images/toolbar or in case of the CSGUI_TOOLBAR_TYPE_VERTICAL or CSGUI_TOOLBAR_TYPE_HORIZONTAL relative to the admin/images/popup directory

$titles : array<string|int, mixed>

the text or tooltip title of the button

$hrefs : array<string|int, mixed> = array('#')

the links of the button

$target : mixed = array('_self')
$onclick : mixed = array('')
$defaultState : bool = true

the default state of the button (true => first state is used, false => second state is used)

$accesskey : string = ''

the keybord accelerator to navigate to the button with the alt key

$id : string = ''

an optional id of the toolbar if you want to use more than one toolbar at the same time

$visibility : string = ''

the visibility with the form GROUP:NAME

Tags
access

public

Return values
CSGuiToolbarButton

the created button object

closeOldIframes()

Defines whether other iframes should be removed, if another iframe is opened. This may be usefull, if one frame contains content which might disturb other frames

public closeOldIframes([bool $closeOldIframes = true ]) : mixed
Parameters
$closeOldIframes : bool = true

whether old frames should be closed

Tags
Return values
mixed

enableJQuery()

Enables JQuery by loading all required libraries

public enableJQuery() : void
Tags
Return values
void

enableJQueryEasy()

Enables JQuery easy by loading all required libraries (experimental only)

public enableJQueryEasy() : void
Tags
Return values
void

enableJQueryPlugin()

Enables jQuery plugin.

public enableJQueryPlugin(string $sPluginName) : bool

For possible plugins see ADMIN_LOCAL/lib/javascript/jquery/plugins subfolder.

Parameters
$sPluginName : string

The name of the jquery plugin (case sensitive) and without the "jquery." prefix. To load the jquery.cookie.js plugin give only "cookie" as param.

Tags
Return values
bool

Whenever the plugin path was found or not.

enableJQueryUI()

Enables JQuery UI by loading all required libraries (experimental only)

public enableJQueryUI() : void
Tags
Return values
void

enableLoadOnDemandContent()

Defines the pane to load iframes and images not before a pane is shown.

public enableLoadOnDemandContent([bool $enabled = true ]) : mixed

This method can be used to increase performance as there is less load when loading the pane.

Parameters
$enabled : bool = true

whether the preloading should be enabled

Tags
Return values
mixed

enablePluginCalls()

Enables / disables all calls to CSGuiComponent plugins, if it is not wanted

public static enablePluginCalls([bool $enabled = false ]) : mixed
Parameters
$enabled : bool = false

whether plugin calls may be used

Tags
Return values
mixed

endPane()

finishes the outputbuffering for the current tab

public endPane() : mixed
Tags
access

protected

Return values
mixed

getController()

returns the controller of this gui component

public getController() : object
Tags
access

public

Return values
object

the controller of the gui component

getControlPaneVisible()

Gets the visibility of the control pane if controls have been definied

public getControlPaneVisible() : bool
Tags
access

public

Return values
bool

whether the controlpane should be displayed or not

getStartTab()

Gets the tab which should be opened at start

public getStartTab() : string
Tags
access

public

Return values
string

the id of the pane

hideSingleTab()

if set to true, the tab bar is hidden if the pane only has one tab button

public hideSingleTab([bool $hide = true ]) : void
Parameters
$hide : bool = true

whether to hide the tab bar if it contains only one tab

Tags
access

public

Return values
void

isPortal()

Returns whether the component is used in the portal

public static isPortal() : bool
Tags
access

protected

Return values
bool

whether the portal mode is activated

makeForwardUrl()

public static makeForwardUrl(mixed $url[, mixed $useRequestParams = array() ]) : mixed
Parameters
$url : mixed
$useRequestParams : mixed = array()
Tags
access

protected

Return values
mixed

makeHtml()

Outputs the complete pane and stops output buffering

public makeHtml() : string

The complete pane area always fills 100% of the available space. If you require a smaller pane area surround the pane with a div and limit the dimensions of the div.

Tags
access

public

Return values
string

html representation of the pane

popupAddCheckboxItem()

Adds a checkbox popup item to the end of the current component's popup

public popupAddCheckboxItem(mixed $sLabel, mixed $sJavascript[, mixed $bIsEnabled = true ][, mixed $bIsSelected = false ][, mixed $sAccessKey = '' ][, mixed $bEvalCondition = true ][, mixed $mNamespaces = array() ][, mixed $sGroupIdentifier = '' ], mixed $iGroupIndex) : void
Parameters
$sLabel : mixed
$sJavascript : mixed
$bIsEnabled : mixed = true
$bIsSelected : mixed = false
$sAccessKey : mixed = ''
$bEvalCondition : mixed = true
$mNamespaces : mixed = array()
$sGroupIdentifier : mixed = ''
$iGroupIndex : mixed
Tags
access

public

Return values
void

popupAddItem()

Adds a popup item to the end of the current component's popup

public popupAddItem(string $sLabel[, string $sJavascript = '' ][, int $bIsEnabled = true ][, string $sIconPath = '' ][, string $sAccessKey = '' ][, bool $bEvalCondition = true ][, array<string|int, mixed>|string $mNamespaces = array() ][, string $sGroupIdentifier = '' ], int $iGroupIndex) : void
Parameters
$sLabel : string

label of the popup item. It can use '//' to create a submenu, e.g. 'submenu_label//sub_submenu_label//label'

$sJavascript : string = ''

Javascript code to call with the popup item

$bIsEnabled : int = true

can be false if the popup item should be visible but disabled

$sIconPath : string = ''

Image of the item relative to the admin/images/popup/ directory

$sAccessKey : string = ''

Keyboard access key of the popup item

$bEvalCondition : bool = true

If the condition should be evaluated.

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

The namespace for the button like "workflow"

$sGroupIdentifier : string = ''

The identifier to add the popup item to a group, which has separator at the beginning and at the end.

$iGroupIndex : int

The index of the group. The index will be used to order the groups. The lowest index will be taken of all popup items inside of a group.

Tags
access

public

Return values
void

popupAddJavascriptFunction()

Adds a Javascript method to the components Javascript which can be used to display a popup.

public popupAddJavascriptFunction([string $jsName = 'displayComponentPopup' ]) : void

It can be called with the given name and the requested POPUPID and event (event object) as argument, e.g. displayComponentPopup(ID, event)

Parameters
$jsName : string = 'displayComponentPopup'

the name of the Javascript method, if it should be different from the standard 'displayComponentPopup'

Tags
Return values
void

popupAddSeparator()

Adds a popup separator item to the end of the current component's popup

public popupAddSeparator([string $evalCondition = true ][, string $subMenu = '' ]) : void
Parameters
$evalCondition : string = true

optional php condition to be evaluated as true to let the popup item be available

$subMenu : string = ''

optional sub menu the separator should be placed within. It can use '//' to add the seperator within a submenu, e.g. 'submenu_label//subsubmenu_label'

Tags
access

public

Return values
void

popupAddSubMenuDefinition()

Adds a definition (Icon, GroupIdentifier, GroupIndex) for a sub menu entry.

public popupAddSubMenuDefinition(string $sSubMenuLabel, string $sIcon[, string $sGroupIdentifier = '' ], int $iGroupIndex) : void
Parameters
$sSubMenuLabel : string

The target sub menu label

$sIcon : string

THe icon of the sub menu.

$sGroupIdentifier : string = ''

The group identifier

$iGroupIndex : int

The index of the group.

Tags
Return values
void

popupEnableDebugMode()

public popupEnableDebugMode() : mixed
Tags
access

private

Return values
mixed

popupEvaluateCode()

Provides a condition which must be true if the popup item should be available

public popupEvaluateCode(mixed $evalCode) : mixed

Sometimes it is necessary to evaluate further code to define a $evalCondition. As the condition only returns one value, this can not be done there. Therefore any phpCode can be evaluated using the popupEvaluateCode method. Here e.g. conditions can be stored in variables which can be used in the $evalCondition later. {RecordID} can be used to get the id of the current selected item

Parameters
$evalCode : mixed
Tags
access

public

Return values
mixed

popupGetJavascript()

Creates a javascript onContext='...' code, which can be inserted in a html component

public popupGetJavascript(string $id[, string $innerHtml = "" ][, string $elementName = 'span' ][, string $embedAttribute = 'oncontextmenu' ][, string $additionalAttributes = "" ][, string $popupUrl = '' ][, string $popupIDField = '' ][, string $jsCode = '' ]) : string
Parameters
$id : string

The value which will can be received using the popupGetRequestID() method

$innerHtml : string = ""

The content of the optional html element is not empty. If this value is not set the $id is used instead

$elementName : string = 'span'

An optional html element name which will contain the attribute

$embedAttribute : string = 'oncontextmenu'

The attribute which should contain the JavaScript code

$additionalAttributes : string = ""

Additional attributes which should be additionally added to the oncontext command

$popupUrl : string = ''

Overwrites the standard url where the popup is defined

$popupIDField : string = ''

Overwrites the standard IDField for the popup which will be added to the request and is necessary to get the results using the popupGetRequestID method if it has been modified

$jsCode : string = ''

The JavaScript code which should be evaluated before the contextmenu is shown

Tags
Return values
string

The JavaScript code or a complete html element which will create the popup request

popupGetMultipleRequestID()

This function may be used to check whether the request is a popupRequest for multiple elements.

public popupGetMultipleRequestID() : bool
Tags
Return values
bool

whether a popup request for multiple items have been sent

popupGetRequestID()

If a user request a popup the id describing the kind of request is returned here This function may also be used to check whether the request is a popupRequest.

public popupGetRequestID() : string
Tags
Return values
string

the ID for which a popup is requested

popupInsertItem()

Adds a popup item into a specified location of the current component's popup

public popupInsertItem(mixed $mIndex, mixed $sLabel[, mixed $sJavascript = '' ][, mixed $bIsEnabled = true ][, mixed $sIconPath = '' ][, mixed $sAccessKey = '' ][, mixed $bEvalCondition = true ][, mixed $mNamespaces = array() ][, mixed $sGroupIdentifier = '' ], mixed $iGroupIndex) : void
Parameters
$mIndex : mixed
$sLabel : mixed
$sJavascript : mixed = ''
$bIsEnabled : mixed = true
$sIconPath : mixed = ''
$sAccessKey : mixed = ''
$bEvalCondition : mixed = true
$mNamespaces : mixed = array()
$sGroupIdentifier : mixed = ''
$iGroupIndex : mixed
Tags
access

public

Return values
void

popupMakeHtml()

Creates the final popup html code

public popupMakeHtml(mixed $PopupID) : mixed
Parameters
$PopupID : mixed
Tags
access

protected

Return values
mixed

popupRemoveAllItems()

Completely removes all popup items from the component

public popupRemoveAllItems([array<string|int, mixed> $keep = array() ][, bool $recursive = false ]) : void
Parameters
$keep : array<string|int, mixed> = array()

the labels of the items which may be kept

$recursive : bool = false

whether this action should be applied to all subcomponents as subtrees in CSGuiMixedTrees

Tags
access

public

Return values
void

popupRemoveItem()

Remove one items from the popup for the component

public popupRemoveItem(string $label[, string|bool $evalCondition = true ][, array<string|int, mixed>|string $aNamespaces = array() ]) : void
Parameters
$label : string

label of the popup item

$evalCondition : string|bool = true

optional php condition to be evaluated as true to let the popup item be available {RecordID} can be used to get the id of the current selected item

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

Either a simple string for a namespace like "workflow" or an array for further specification like array("Workflow", "123"). All items having the same label and all namespaces passed set (even if they are having more) will be removed.

Tags
access

public

Return values
void

popupRemoveItemsByNamespace()

Remove multiple from the popup specified by the namespace. All items having all the passed namespaces will be removed even if they are having more than the passed.

public popupRemoveItemsByNamespace([array<string|int, mixed> $aNamespaces = array() ]) : void
Parameters
$aNamespaces : array<string|int, mixed> = array()

An array containing all the defined namespaces for the popup items to be removed

Tags
Return values
void

popupSetCharset()

Sets the encoding for the popup components

public popupSetCharset(mixed $charset) : string
Parameters
$charset : mixed
Tags
Return values
string

$charset the new characterset

popupSetDefaultPopup()

Sets the default popup for the component

public popupSetDefaultPopup(CSGuiPopup $popup) : void
Parameters
$popup : CSGuiPopup

Popup object to use as popup for the component

Tags
access

protected

Return values
void

popupSetRequestID()

Overwrites the id returned by popupSetRequestID

public popupSetRequestID(string $id) : void
Parameters
$id : string

the value of the id to overwrite

Tags
Return values
void

popupSetUrl()

Changes the url where the popup should be loaded from.

public popupSetUrl([string $popupUrl = '' ][, string $idField = 'POPUP_ID' ][, bool $recursive = false ]) : void

It can be set if the pure forward name is not sufficient or another file should be used for a popup request This is an important option to add additional GET parameters, which should be available again for popups You can add additionalParameters to the forward url using the & seperator, e.g 'destination.php&param1=true'

Parameters
$popupUrl : string = ''

the url where the popup is defined

$idField : string = 'POPUP_ID'

the IDField for the popup which will be added to the request and is necessary to get the results using the popupGetRequestID method if it has been modified

$recursive : bool = false

whether this action should be applied to all subcomponents as subtrees in CSGuiMixedTrees

Tags
access

public

Return values
void

popupSetVisible()

Enables or disables the visiblity of the popup.

public popupSetVisible([bool $visibility = null ]) : void

If a popupAddItem is called before, the popup is automatically set to visible . If you only create the popup menu when recieving the popupGetRequestID parameter you have to enable the popup menu manually. You can even hide the popup completly be setting the $visibility to false

Parameters
$visibility : bool = null

whether the component has a visible popup menu

Tags
access

public

Return values
void

popupUseDefaultItem()

Adds a standard popup item to the end of the current component's popup

public popupUseDefaultItem(string $label[, string|bool $evalCondition = true ]) : void

The popupitems defined using the popupSetDefaultPopup can be reused after popupRemoveAllItems has been called. This offers the possibility to reuse working popupitems in a userdefined popupmenu The type of popup item which should be used is defined by the $label parameter. This label represents the label of the original item

Parameters
$label : string

label of the popup item

$evalCondition : string|bool = true

php condition to be evaluated as true to let the popup item be available

Tags
access

public

Return values
void

removePane()

removes the pane with the specified title

public removePane(string $title) : void
Parameters
$title : string

the title of the tab to remove

Tags
access

public

Return values
void

setController()

sets the controller for the gui component

public setController(object $oController) : void
Parameters
$oController : object

the controller for the gui component

Tags
access

public

Return values
void

setControlPaneState()

Sets the state of the control pane

public setControlPaneState([bool $showControl = true ][, bool $useCookies = true ]) : void
Parameters
$showControl : bool = true

whether the controlpane should be opened

$useCookies : bool = true

whether the state of the controlpane should be stored in a cookie

Tags
access

public

Return values
void

setControlPaneVisible()

Sets the visibility of the control pane if controls have been definied

public setControlPaneVisible([mixed $visible = false ]) : void
Parameters
$visible : mixed = false
Tags
access

public

Return values
void

setForceDefaultStatesControl()

Sets whether the default states should be restored in the control pane after a reload or may be loaded from a cookie

public setForceDefaultStatesControl(bool $force) : void
Parameters
$force : bool

if true the states are not stored in a cookie

Tags
access

public

Return values
void

setPaneID()

Sets the ID for the CSGuiPane

public setPaneID(string $paneID) : void
Parameters
$paneID : string

the new ID of the CSGuiTabbedPane

Tags
Return values
void

setPaneLabel()

Sets the label of the current tab, if a tab has been opened.

public setPaneLabel(string $label) : void
Parameters
$label : string

the new label of the pane

Tags
access

public

Return values
void

setPortalMode()

Sets the component to the browsers portal

public static setPortalMode([mixed $isPortal = true ]) : void
Parameters
$isPortal : mixed = true
Tags
access

protected

Return values
void

setRightTitle()

Sets the right caption for the TabbedPane

public setRightTitle(string $title) : void
Parameters
$title : string

the label of the pane which should be displayed at the right side

Tags
access

public

Return values
void

setStartTab()

Defines the tab which should be opened at start

public setStartTab(string $title) : void
Parameters
$title : string

the label of the pane

Tags
access

public

Return values
void

showOnlyIcons()

if set to true, the tab bar titles show only the icons if given

public showOnlyIcons([bool $showOnly = true ]) : void
Parameters
$showOnly : bool = true

whether to show only the icons

Tags
access

public

Return values
void

throwError()

Throws a CSException

public static throwError(string $sMessage, int $iCode) : void
Parameters
$sMessage : string
$iCode : int
Tags
Return values
void

        

Search results