Contentserv PHP API

CSGuiModalDialog extends CSGuiWindow
in package

The CSGuiWindow is the root class of all CSGui Windows and Dialogs and represents a full HTML window

All classes based on the CSGuiWindow return html including a head and body area. It enables you to add custom js and css code or link and to overwrite especially the method to create additional predefined dialogs. Additionally the CSGuiWindow already contains a link to the admin.css.

Tags

Table of Contents

$_activatePatternCheck  : mixed
$additionalHead  : mixed
$ajaxReloadCompleteWindow  : mixed
$ajaxReloadParts  : mixed
$bodyAttributes  : mixed
$bodyClasses  : mixed
$bottomTitle  : mixed
$cancelButtonID  : mixed
$cancelButtonLabel  : mixed
$cancelButtonOnClick  : mixed
$charset  : mixed
$csscodes  : mixed
$csslinks  : mixed
$doctype  : mixed
$formAttributes  : mixed
$isAjaxReloadable  : mixed
$isDisabled  : mixed
$isPortal  : mixed
$jscodes  : mixed
$jslinks  : mixed
$jsprototyping  : mixed
$metaData  : mixed
$okButtonID  : mixed
$okButtonLabel  : mixed
$okButtonOnClick  : mixed
$popup  : mixed
$popupIDField  : mixed
$popupUrl  : mixed
$rightTitle  : mixed
$rows  : mixed
$showCancelButton  : mixed
$showOkButton  : mixed
$showSubTitle  : mixed
$showTitle  : mixed
$subTitle  : mixed
$type  : mixed
$windowTitle  : mixed
__construct()  : mixed
CSGuiModalDialog constructor.
activateCompression()  : mixed
Activates GZIP-Compression for this window
activateDragAndDropHandling()  : void
Activates drag and drop support for all browsers on this window.
activateNotes()  : mixed
Activates the note mode for this window. If activated notes can be placed anywhere within the given target
activatePatternCheck()  : void
Activates the pattern check for the form.
addAdditionalButtonComponent()  : void
Adds a HTML Component (string) in between OK and CANCEL button Several components may be added.
addBodyAttributes()  : void
Adds attributes to the body tag of the window
addBodyClass()  : void
Adds a class to the body tag of the window
addContent()  : void
Adds any html output to the inner area of the window
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.
addFile()  : void
Includes any html or php file to the inner area of the window while executing contained php code
addHeadHtml()  : void
Add head content
addImportantJSCode()  : void
Adds JavaScript code snippet to the windows internal scripts as they are used in the HEAD.
addJSAPI()  : void
Preloads a js API library instead of using CS.loadAPI in the code
addJSCode()  : void
Adds JavaScript code snippet to the windows internal scripts as they are used in the HEAD.
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
addMeta()  : void
Adds a meta data to the windows head
addRow()  : void
Adds another table row with one label and one input field
disableJSPrototyping()  : mixed
Due to backward compatibility CONTENTSERV uses prototyping on the javascript Object context (Object.prototype).
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)
enablePluginCalls()  : mixed
Enables / disables all calls to CSGuiComponent plugins, if it is not wanted
getBasePath()  : string
Returns the path to be used as a base for other page links
getController()  : object
returns the controller of this gui component
getDefaultCancelButtonOnClick()  : string
Returns the default javascript onclick code of the dialog.
getDefaultCloseDialogJs()  : string
Returns the javascript code which closes the dialog and given $mReturnValue will be passed to the callback function defined upon the opening of dialog.
getDefaultOkButtonOnClick()  : string
Returns the default js code snippet for OK button.
getFormName()  : string
Returns the Form name/id.
getIEMetaCompatible()  : mixed
Get the X-UA-Compatible meta tag string with given IE version.
getReturnOnlyFirst()  : bool
Returns the defined javascript dialog return type.
getTopWindow()  : CSGuiWindow
Returns the instance of the first opened CSGuiWindow component, which had not been build using makeHtml This method offers the possibility to place scripts, ... in the windows head section
isAjaxReloadRequest()  : bool
Returns whether this request is a ajax reload request
isPortal()  : bool
Returns whether the component is used in the portal
makeBody()  : mixed
makeForwardUrl()  : mixed
makeHead()  : mixed
makeHtml()  : string
Creates an html representation of the window according to the current settings
makeHtmlBegin()  : mixed
makeHtmlEnd()  : mixed
makeJSCode()  : string
Returns a string with script-tags.
makeOuterBody()  : mixed
makeOuterHead()  : mixed
makeRows()  : mixed
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
setAjaxReloadable()  : mixed
Defines whether this window can be reloaded using ajax request to optimize performance
setAjaxReloadCompleteWindow()  : void
Defines that the complete window contents must be reloaded If not set only the parts defined using the setAjaxReloadPart method are changed
setAjaxReloadPart()  : string
If this window is defined ajax reloadable and a ajax reload request is passed this method can be used to change only parts of the html If no ajax part is defined the complete body ('CSGuiWindowBody') and head ('CSGuiWindowHead') is passed
setBasePath()  : void
Defines the path to be used as a base for other page links
setBodyAttributes()  : void
Sets the attributes in the body tag of the window
setBottomTitle()  : void
Sets the BottomTitle of the Dialog
setCancelButtonID()  : void
Sets the id of the cancel button.
setCancelButtonLabel()  : void
Sets the label of the cancel button.
setCancelButtonOnClick()  : void
Sets the js function that is executed when the cancel button is pressed
setCancelButtonVisible()  : void
Sets the visibility of the Cancel Button
setCharset()  : void
Overwrites the default charset of the html document (UTF-8)
setController()  : void
sets the controller for the gui component
setDoctype()  : void
Overwrites the default Doctype of the html document
setFormAttributes()  : void
Sets the attributes of the dialog form
setFormName()  : void
Sets the Form name/id.
setFullHeight()  : void
Sets whether the html and body tag should get 100% height attributes
setHideButtonRow()  : mixed
Sets whether the table row containing the buttons should be hidden
setIEMetaCompatible()  : void
Overwrites the default meta http-equiv of the html document.
setOkButtonID()  : void
Sets the id of the ok button.
setOkButtonLabel()  : void
Sets the label of the ok button.
setOkButtonOnClick()  : void
Sets the js function that is executed when the ok button is pressed
setOkButtonVisible()  : void
Sets the visibility of the OK Button
setPortalMode()  : void
Sets the component to the browsers portal
setReturnOnlyFirst()  : void
Defines in which way the return value of the dialog should be.
setRightTitle()  : void
sets the top right title for the dialog
setSubTitle()  : void
Sets the SubTitle of the Dialog It is possible to set the Dialog Title and SubTitle dynamically by passing 'DialogTitle' and 'DialogSubTitle' upon dialog opening.
setSubTitleVisible()  : void
Sets the SubTitle Visibility of the Dialog.
setTitle()  : void
Sets the title of the Dialog
setTitleVisible()  : void
Sets the Title Visibility of the Dialog Sets the visibility of the Title.
setType()  : void
Sets the type of Editor
setUniqueID()  : void
Sets the CSUniqueID for this window
setWindowTitle()  : void
Sets the window title as it is used in the heads title element
throwError()  : void
Throws a CSException

Properties

$_activatePatternCheck

public mixed $_activatePatternCheck = \null
Tags
access

private

$additionalHead

public mixed $additionalHead = ""
Tags
access

private

$ajaxReloadCompleteWindow

public mixed $ajaxReloadCompleteWindow = \false
Tags
access

private

$ajaxReloadParts

public mixed $ajaxReloadParts = array()
Tags
access

private

$bodyAttributes

public mixed $bodyAttributes = ''
Tags
access

private

$bodyClasses

public mixed $bodyClasses = array()
Tags
access

private

$cancelButtonID

public mixed $cancelButtonID = "CSGUI_MODALDIALOG_CANCELBUTTON"
Tags
access

private

$cancelButtonLabel

public mixed $cancelButtonLabel = ""
Tags
access

private

$cancelButtonOnClick

public mixed $cancelButtonOnClick = "cancel();"
Tags
access

private

$csscodes

public mixed $csscodes = array()
Tags
access

private

public mixed $csslinks = array()
Tags
access

private

$formAttributes

public mixed $formAttributes = " onsubmit='return false' "
Tags
access

private

$isAjaxReloadable

public mixed $isAjaxReloadable = \false
Tags
access

private

$isDisabled

public mixed $isDisabled = \false
Tags
access

private

$jscodes

public mixed $jscodes = array('before' => array(), 'after' => array(), 'important' => array())
Tags
access

private

public mixed $jslinks = array()
Tags
access

private

$jsprototyping

public mixed $jsprototyping = \true
Tags
access

private

$metaData

public mixed $metaData = array()
Tags
access

private

$okButtonID

public mixed $okButtonID = "CSGUI_MODALDIALOG_OKBUTTON"
Tags
access

private

$okButtonOnClick

public mixed $okButtonOnClick = "confirmDialog();"
Tags
access

private

$showCancelButton

public mixed $showCancelButton = \true
Tags
access

private

$windowTitle

public mixed $windowTitle
Tags
access

private

Methods

__construct()

CSGuiModalDialog constructor.

public __construct([string $title = '' ][, string $subTitle = '' ][, string $type = 'CSGUI_DIALOG_TYPE_GRAY' ]) : mixed
Parameters
$title : string = ''
$subTitle : string = ''
$type : string = 'CSGUI_DIALOG_TYPE_GRAY'
Tags
Return values
mixed

activateCompression()

Activates GZIP-Compression for this window

public static activateCompression([bool $activate = true ]) : mixed
Parameters
$activate : bool = true

whether the window should be compressed using gzip, or not

Tags
Return values
mixed

activateDragAndDropHandling()

Activates drag and drop support for all browsers on this window.

public activateDragAndDropHandling() : void

If required special mouse handlers are registered.

Tags
Return values
void

activateNotes()

Activates the note mode for this window. If activated notes can be placed anywhere within the given target

public activateNotes(mixed $mContextModules, string $contextRecord, string $contextID[, string $subContext = '' ][, float $zoom = '100' ][, string $targetElementID = '' ][, bool $autoLoad = true ]) : mixed
Parameters
$mContextModules : mixed

The context module of the note as a string (for a single module) or an array in case the notes for multiple modules should be returned.

$contextRecord : string

The record context the notes should be stored for

$contextID : string

The context id the notes should be stored for

$subContext : string = ''

An optional subcontext the notes should be stored for

$zoom : float = '100'

The current zoom level in percent

$targetElementID : string = ''

The ID of the element the notes should be placed relative to. If null the window is the target

$autoLoad : bool = true

If true, the CSNotes.LoadNotes-JS-Method is executed to load all notes. Otherwise this method must be called by the developer

Tags
Return values
mixed

activatePatternCheck()

Activates the pattern check for the form.

public activatePatternCheck([string $attributeName = 'cs_pattern' ]) : void
Parameters
$attributeName : string = 'cs_pattern'
Tags
Return values
void

addAdditionalButtonComponent()

Adds a HTML Component (string) in between OK and CANCEL button Several components may be added.

public addAdditionalButtonComponent(string $sButtonComponentHtml) : void
Parameters
$sButtonComponentHtml : string
Tags
Return values
void

addBodyAttributes()

Adds attributes to the body tag of the window

public addBodyAttributes(string $bodyAttributes) : void
Parameters
$bodyAttributes : string

the additional attributes to be added to the body tag

Tags
access

public

Return values
void

addBodyClass()

Adds a class to the body tag of the window

public addBodyClass(string $className) : void
Parameters
$className : string

the additional classname to be added to the body tag

Tags
access

public

Return values
void

addContent()

Adds any html output to the inner area of the window

public addContent(string $content) : void

The inner content is captured with output buffering and returned later with the makeHtml method. Alternatively it's therefore possible to echo or output content directly.

Parameters
$content : string

the content to be added

Tags
access

public

Return values
void

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 $code) : void
Parameters
$code : 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 $href) : void
Parameters
$href : string

the href of the css file

Tags
access

public

Return values
void

addFile()

Includes any html or php file to the inner area of the window while executing contained php code

public addFile(string $file) : void
Parameters
$file : string

the file to be added relative to the admin/forward.php

Tags
access

public

Return values
void

addHeadHtml()

Add head content

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

the content in form of HTML which should be added to the head

Tags
access

public

Return values
void

addImportantJSCode()

Adds JavaScript code snippet to the windows internal scripts as they are used in the HEAD.

public addImportantJSCode(string $sCodeSnippet) : void

The added code snippet is marked as 'important'. This code snippets are added BEFORE JavaScript code snippets added with addJSCode-method

Parameters
$sCodeSnippet : string

The pure JavaScript code (without script-tags)

Tags
Return values
void

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 JavaScript code snippet to the windows internal scripts as they are used in the HEAD.

public addJSCode(string $code[, bool $before = true ]) : void
Parameters
$code : string

The code of the js without any <javasctipt> elements

$before : bool = true

If set to TRUE, the given code snippet is added to the head otherwise after BODY

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 $href) : void
Parameters
$href : 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

addMeta()

Adds a meta data to the windows head

public addMeta(string $name, string $content) : void
Parameters
$name : string
$content : string
Tags
access

public

Return values
void

addRow()

Adds another table row with one label and one input field

public addRow(string $label, string $component[, string $additionalAttributes = '' ]) : void
Parameters
$label : string

the label of the input field

$component : string
$additionalAttributes : string = ''

the html content of the input field, can be any valid HTML code

Tags
access

public

Return values
void

disableJSPrototyping()

Due to backward compatibility CONTENTSERV uses prototyping on the javascript Object context (Object.prototype).

public disableJSPrototyping() : mixed

This causes error in many scripts as the can not iterate through objects using for (var XXX in object) If no internal CS method is used which requires prototyping it can be disabled. In future version it might be disabled as standard behaviour

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

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

getBasePath()

Returns the path to be used as a base for other page links

public getBasePath() : string
Tags
Return values
string

getController()

returns the controller of this gui component

public getController() : object
Tags
access

public

Return values
object

the controller of the gui component

getDefaultCancelButtonOnClick()

Returns the default javascript onclick code of the dialog.

public getDefaultCancelButtonOnClick() : string
Tags
Return values
string

getDefaultCloseDialogJs()

Returns the javascript code which closes the dialog and given $mReturnValue will be passed to the callback function defined upon the opening of dialog.

public getDefaultCloseDialogJs(mixed $mReturnValue) : string
Parameters
$mReturnValue : mixed

A mixed type value which will be passed to the callback function.

Tags
Return values
string

getDefaultOkButtonOnClick()

Returns the default js code snippet for OK button.

public getDefaultOkButtonOnClick() : string
Tags
Return values
string

getFormName()

Returns the Form name/id.

public getFormName() : string
Tags
Return values
string

getIEMetaCompatible()

Get the X-UA-Compatible meta tag string with given IE version.

public getIEMetaCompatible(mixed $iIEVersion) : mixed

This string is used to render the window in desired mode (+ quircks mode).

Parameters
$iIEVersion : mixed
Tags
Return values
mixed

getReturnOnlyFirst()

Returns the defined javascript dialog return type.

public getReturnOnlyFirst() : bool

Default is FALSE, e.g. all values are returned

Tags
Return values
bool

getTopWindow()

Returns the instance of the first opened CSGuiWindow component, which had not been build using makeHtml This method offers the possibility to place scripts, ... in the windows head section

public static getTopWindow() : CSGuiWindow
Tags
Return values
CSGuiWindow

the top CSGuiWindow in the script

isAjaxReloadRequest()

Returns whether this request is a ajax reload request

public isAjaxReloadRequest() : bool
Tags
Return values
bool

whether a ajax reload request is passed

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

makeBody()

public makeBody() : mixed
Tags
access

private

Return values
mixed

makeForwardUrl()

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

protected

Return values
mixed

makeHead()

public makeHead() : mixed
Tags
access

protected

Return values
mixed

makeHtml()

Creates an html representation of the window according to the current settings

public makeHtml() : string
Tags
access

public

Return values
string

html of the window

makeHtmlBegin()

public makeHtmlBegin() : mixed
Tags
access

protected

Return values
mixed

makeHtmlEnd()

public makeHtmlEnd() : mixed
Tags
access

protected

Return values
mixed

makeJSCode()

Returns a string with script-tags.

public makeJSCode([string $section = 'before' ]) : string
Parameters
$section : string = 'before'
Tags
access

protected

Return values
string

makeOuterBody()

public makeOuterBody() : mixed
Tags
access

protected

Return values
mixed

makeOuterHead()

public makeOuterHead() : mixed
Tags
access

protected

Return values
mixed

makeRows()

public makeRows() : mixed
Tags
access

private

Return values
mixed

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

setAjaxReloadable()

Defines whether this window can be reloaded using ajax request to optimize performance

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

whether this window can be ajax reloaded

Tags
Return values
mixed

setAjaxReloadCompleteWindow()

Defines that the complete window contents must be reloaded If not set only the parts defined using the setAjaxReloadPart method are changed

public setAjaxReloadCompleteWindow([mixed $ajaxReloadCompleteWindow = true ]) : void
Parameters
$ajaxReloadCompleteWindow : mixed = true
Tags
params

bool $ajaxReloadCompleteWindow

Return values
void

setAjaxReloadPart()

If this window is defined ajax reloadable and a ajax reload request is passed this method can be used to change only parts of the html If no ajax part is defined the complete body ('CSGuiWindowBody') and head ('CSGuiWindowHead') is passed

public setAjaxReloadPart(string $id, string $html) : string
Parameters
$id : string

the id of the html element which should be replaced

$html : string

the new html code for this element. If set to the boolean false this part is never added (until resetted with true)

Tags
Return values
string

the $html

setBasePath()

Defines the path to be used as a base for other page links

public setBasePath(string $sHref) : void
Parameters
$sHref : string
Tags
Return values
void

setBodyAttributes()

Sets the attributes in the body tag of the window

public setBodyAttributes(string $bodyAttributes) : void
Parameters
$bodyAttributes : string

the attributes to be added to the body tag

Tags
access

public

Return values
void

setBottomTitle()

Sets the BottomTitle of the Dialog

public setBottomTitle(string $bottomTitle) : void
Parameters
$bottomTitle : string

the subtitle of the dialog

Tags
access

public

Return values
void

setCancelButtonID()

Sets the id of the cancel button.

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

the id the button should have

Tags
access

public

Return values
void

setCancelButtonLabel()

Sets the label of the cancel button.

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

the label the button should have

Tags
access

public

Return values
void

setCancelButtonOnClick()

Sets the js function that is executed when the cancel button is pressed

public setCancelButtonOnClick(string $onClick) : void
Parameters
$onClick : string

the onclick-code to be executed

Tags
access

public

Return values
void

setCancelButtonVisible()

Sets the visibility of the Cancel Button

public setCancelButtonVisible(bool $boolean) : void
Parameters
$boolean : bool

if true the Cancel Button is visible

Tags
access

public

Return values
void

setCharset()

Overwrites the default charset of the html document (UTF-8)

public setCharset(string $charset[, bool $changeLocale = true ]) : void

The charset argument is used in the content-type meta tag in the form

Parameters
$charset : string

the charset to use for the document

$changeLocale : bool = true

whether the new characterset should be applied to all translations

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

setDoctype()

Overwrites the default Doctype of the html document

public setDoctype(string $sDocType) : void
Parameters
$sDocType : string

The DOCTYPE line to use for the document

Tags
access

public

Return values
void

setFormAttributes()

Sets the attributes of the dialog form

public setFormAttributes([string $attributes = " onsubmit='return false' " ]) : void
Parameters
$attributes : string = " onsubmit='return false' "

The new form attributes

Tags
Return values
void

setFormName()

Sets the Form name/id.

public setFormName(string $sName) : void
Parameters
$sName : string
Tags
Return values
void

setFullHeight()

Sets whether the html and body tag should get 100% height attributes

public setFullHeight([bool $fullHeight = true ]) : void
Parameters
$fullHeight : bool = true

whether 100% height should be used

Tags
Return values
void

setHideButtonRow()

Sets whether the table row containing the buttons should be hidden

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

whether the row should be hidden

Tags
Return values
mixed

setIEMetaCompatible()

Overwrites the default meta http-equiv of the html document.

public setIEMetaCompatible(string $sNewIEMetaCompatible) : void
Parameters
$sNewIEMetaCompatible : string

The meta http-equiv line to use for the document. If set to FALSE the IE meta tag will be deactivated/removed.

Tags
access

public

Return values
void

setOkButtonID()

Sets the id of the ok button.

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

the id the button should have

Tags
access

public

Return values
void

setOkButtonLabel()

Sets the label of the ok button.

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

the label the button should have

Tags
access

public

Return values
void

setOkButtonOnClick()

Sets the js function that is executed when the ok button is pressed

public setOkButtonOnClick(string $onClick) : void
Parameters
$onClick : string

the onclick-code to be executed

Tags
access

public

Return values
void

setOkButtonVisible()

Sets the visibility of the OK Button

public setOkButtonVisible(bool $boolean) : void
Parameters
$boolean : bool

$boolean if true the OK Button is visible

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

setReturnOnlyFirst()

Defines in which way the return value of the dialog should be.

public setReturnOnlyFirst(bool $mReturnType) : void

Possible states:

  • set to TRUE (previously known as $_REQUEST['returnOnlyFirst'] = true)
  • set to FALSE (default behaviour)
Parameters
$mReturnType : bool
Tags
Return values
void

setRightTitle()

sets the top right title for the dialog

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

the title to show

Tags
access

public

Return values
void

setSubTitle()

Sets the SubTitle of the Dialog It is possible to set the Dialog Title and SubTitle dynamically by passing 'DialogTitle' and 'DialogSubTitle' upon dialog opening.

public setSubTitle(string $subTitle) : void

e.g. window.csShowModalDialog( URL_DIALOG, {'DialogTitle' : 'MyCustomDialogTitle', 'DialogSubTitle' : 'MyCustomSubTitle'}, ... );

Parameters
$subTitle : string

the subtitle of the dialog

Tags
access

public

Return values
void

setSubTitleVisible()

Sets the SubTitle Visibility of the Dialog.

public setSubTitleVisible(bool $boolean) : void

Sets the visibility of the SubTitle.

Parameters
$boolean : bool

whether to show or to hide the subtitle

Tags
access

public

Return values
void

setTitle()

Sets the title of the Dialog

public setTitle(string $sTitle) : void
Parameters
$sTitle : string

The title of the dialog

Tags
access

public

Return values
void

setTitleVisible()

Sets the Title Visibility of the Dialog Sets the visibility of the Title.

public setTitleVisible(bool $boolean) : void
Parameters
$boolean : bool

whether to show or hide the title

Tags
access

public

Return values
void

setType()

Sets the type of Editor

public setType(string $type) : void
Parameters
$type : string

One of the defined constants CSGUI_DIALOG_TYPE_*

Tags
Return values
void

setUniqueID()

Sets the CSUniqueID for this window

public setUniqueID([bool|string $id = true ]) : void
Parameters
$id : bool|string = true

the new uniqueID either as string or as bool (false: no uniqueID is set, true: a random uniqueID is set)

Tags
Return values
void

setWindowTitle()

Sets the window title as it is used in the heads title element

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

the title to use for the document

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