Contentserv PHP API

CSGuiEditorDialog extends CSGuiEditor
in package

The CSGuiDialog is a classical CONTENTSERV window with a toolbar and an inner area

Tags
since
4.2.1

Table of Contents

$additionalHead  : mixed
$additionalJavascript  : mixed
$ajaxReloadCompleteWindow  : mixed
$ajaxReloadParts  : mixed
$bodyAttributes  : mixed
$bodyClasses  : mixed
$charset  : mixed
$checkBeforeSaveJavascript  : mixed
$csscodes  : mixed
$csslinks  : mixed
$doctype  : mixed
$editbuilder  : mixed
$editorType  : mixed
$guiTable  : mixed
$isAjaxReloadable  : mixed
$isDisabled  : mixed
$isPortal  : mixed
$jscodes  : mixed
$jslinks  : mixed
$jsprototyping  : mixed
$menubar  : CSGuiMenubar
$menubarIsVisible  : mixed
$metaData  : mixed
$pane  : mixed
$popup  : mixed
$popupIDField  : mixed
$popupUrl  : mixed
$record  : Record
$rightTitle  : mixed
$singleFormMode  : mixed
$subTitleIsVisible  : mixed
$title  : mixed
$titleIsDark  : mixed
$titleIsVisible  : mixed
$toolbar  : CSGuiToolbar
$toolbarIsVisible  : mixed
$toolbarSize  : mixed
$type  : mixed
$visibility  : mixed
$windowTitle  : mixed
__construct()  : mixed
CSGuiEditorDialog constructor.
activateCompression()  : mixed
Activates GZIP-Compression for this window
activateDragAndDropHandling()  : void
Activates drag and drop support for all browsers on this window.
activateEditorLayoutMode()  : void
Activates the editorLayoutMode which renders all inputs to be able to reuse them in with CSGuiEditorLayout components, e.g. in the frontend This method must be called before makeHtml is called
activateFilterInput()  : void
Activates the filter input for the editor which allows to dynamically filter options. This concept currently does not work properly when delayed pane loading is activated.
activateNotes()  : mixed
Activates the note mode for this window. If activated notes can be placed anywhere within the given target
activateTabLayout()  : void
activates tab layout for the editor dialog (allows to place fields inside of custom tabs and/or sections)
addBeforeSaveJSCode()  : mixed
Adds javascript code which should be evaluated with eval before save. If it is evaluated to false, the save is aborted.
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
addControl()  : void
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.
addField()  : void
Adds a field to the editor definition
addFile()  : void
Includes any html or php file to the inner area of the window while executing contained php code
addGuiField()  : mixed
addHeadHtml()  : void
Add head content
addHiddenInput()  : mixed
Adds a hidden input field to the Editor
addIFrameControl()  : SectionPaneSection
Adds a special sub pane that contains an iframe and is visible for all tabs
addIFramePane()  : string
Adds a special sub pane that contains an iframe and activates the output buffering to catch content for the pane area
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
addPane()  : void
Adds a sub pane and activates the output buffering to catch content for the pane area The arguments are passed to the corresponding pane. Therfore an image can be used as third parameter for CSGuiTreePanes and CSGuiSwitchPanes.
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
addRightTitle()  : void
Adds content to the right part of the title label below the toolbar The title is not translated.
addSetting()  : void
Adds a field to the list settings dialog
addWhitePane()  : void
Adds a white sub pane and activates the output buffering to catch content for the pane area.
changeField()  : void
Changes the field definition of a field
createHtmlEditor()  : CSGuiRichEditor
Creates a CSGuiHtmlEditor and links it to the dialog.
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)
enableLoadOnDemandContent()  : void
Defines the editor to load iframes and images not before its pane is shown.
enablePluginCalls()  : mixed
Enables / disables all calls to CSGuiComponent plugins, if it is not wanted
enableSavingContentFromInnerFrames()  : void
Sets the editor to save content from within iframes, if they have implemented one of the following methods: - function csBuilderMaySave() {} prepares the iframe for storage and returns whether the outer frame may be stored or not - function getFormForSaving() {} returns the form from which all elements should be copied to the original form which is stored
generateDefaultToolbar()  : mixed
getBasePath()  : string
Returns the path to be used as a base for other page links
getController()  : object
returns the controller of this gui component
getCurrentAction()  : string
Returns the action is has been executed before, e.g. store, checkin, checkout, .
getEditorLayout()  : CSGuiEditorLayout
Returns the CSGuiEditorLayout component representing the current editor It is recommended to call the makeHtml method before to create all dynamic fields This object can be used to create a representation of the editor in the frontend changing the layout but reusing the logic
getEditUrl()  : string
Returns the current editURL
getFieldKeyDetails()  : array<string|int, mixed>
returns details for the key of an editor field (e.g. CS_ItemAttribute_0_20_1
getFormName()  : string
Gets the name for the edit form
getGeneralPaneTitle()  : mixed
getGuiSplitArea()  : CSGuiSplitArea
Returns the CSGuiSplitArea around the content where one can add components to the left, top, bottom or right.
getIEMetaCompatible()  : mixed
Get the X-UA-Compatible meta tag string with given IE version.
getInputID()  : string
Returns the id for the input which can be referenced by using javascript
getLanguageFlagImage()  : string
Returns the separator for the language flag, if the record supports languages. It will be replaced later by the correct flag.
getPane()  : mixed
getRecord()  : Record
Returns a reference of the current record which is used in the editbuilder
getSetting()  : string
Returns the value of a defined Setting for the current user
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
hasAlreadyBeenSend()  : bool
This method can be called to check whenever a request is send to the CSGui Editor before.
isAjaxReloadRequest()  : bool
Returns whether this request is a ajax reload request
isPortal()  : bool
Returns whether the component is used in the portal
isSavable()  : bool
Returns whether the editor is savable at the moment
makeAllFieldsHtml()  : CSGuiTable
Creates the html representation of all the current fields within the edit form in a default table This function creates all defined input components with a label and adds them to the current CSGuiTable
makeBody()  : mixed
makeFieldHtml()  : CSGuiTable
Creates the html representation for the labeld input object including a complete table row This function creates input component with a label and adds it to the current CSGuiTable
makeForwardUrl()  : mixed
makeHead()  : mixed
makeHtml()  : string
Creates an html representation of the window according to the current settings
makeHtmlBegin()  : mixed
makeHtmlEnd()  : mixed
makeInputFieldHtml()  : string
Creates the html representation for the pure input object of a specific named field This function creates only the input component without a label
makeJSCode()  : string
Returns a string with script-tags.
makeOuterBody()  : mixed
makeOuterHead()  : mixed
menubarAddHandle()  : void
Adds a handle as next item in the dialogs Menubar
menubarAddHelp()  : void
Adds a help popup menu to the dialogs Menubar
menubarAddItem()  : void
Adds a menu entry to the dialogs Menubar
menubarAddLink()  : void
Adds a menu to the dialogs Menubar, which represents a link
menubarAddMenu()  : void
Adds a popup menu to the dialogs Menubar, which request a popup menu from the server if it is clicked
menubarAddPopup()  : void
Adds a popup menu to the dialogs Menubar. If there had been already one popup defined with the same label this popup is appended to it.
menubarAddUploadItem()  : CSGuiToolbarButton
Adds an upload button to the menubar The button is displayed on the upper border of the dialog.
menubarIsCollapsed()  : bool
Tells if the menubar is collapsed, either by explicitly calling the setCollapsed method or by the default settings in the skin options.
menubarRemoveAllMenus()  : void
Removes all menus from the dialogs Menubar
menubarSetCollapsed()  : mixed
Collapses the menubar into a toolbar button with context menu
menubarSetRightTitle()  : void
Sets an arbitrary html text on the right end of the menubar
menubarSetShowInTreeButtonVisible()  : void
Sets the visibility of the "Show In Tree" menubar entry.
menubarSetUrl()  : void
Changes the url where the menubar should be loaded from when using the menubarAddMenu function.
menubarSetVisible()  : void
Sets the visibility of the menubar
newGuiTable()  : CSGuiTable
Creates a new gui table to add new elements to
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
reinit()  : mixed
Reload the editor for a new record.
removeAllFields()  : void
Completely removes all fields from the editor definition
removeField()  : void
Removes a field from the editor definition
removePane()  : void
Removes all fields from a Pane or a Section from the dialog
setAcceptMode()  : void
Set's whether the save button (checkin button if the record can be checked out) automatically closes the window
setAccessLevelControlVisible()  : void
Sets the visibility of the access level control
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
setAjaxSubmit()  : mixed
Sets whether the editor should be submitted using Ajax
setAttachmentControlVisible()  : void
Sets the visibility of the attachement control
setAttributeDisabledOnFields()  : void
Enables the use of html attribute disabled on fields (input, select, etc) This method works only for simple fields (Types supported on Reference Dialog)
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
setCharset()  : void
Overwrites the default charset of the html document (UTF-8)
setClassName()  : void
Changes the cascading style sheet class base name of the editor components
setCloneable()  : void
Set's the editor dialog to be clonable
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
setDefaultColumnCount()  : mixed
setDefaultConfiguration()  : mixed
setDeletable()  : void
Set's the editor dialog to be deletable
setDoctype()  : void
Overwrites the default Doctype of the html document
setEditable()  : void
Set's the editor dialog to be storable
setEditUrl()  : void
Set's the base url of the editor dialog in order to restore additional parameters
setEnctype()  : void
Sets the encoding type for the editors form
setFieldContextRestoreOnLoad()  : void
Activates the keep scroll position for the editor
setForceDefaultStatesControl()  : void
Sets whether the default states should be restored in the control pane after a reload or may be loaded from a cookie
setFormName()  : void
Sets the name for the form
setFullHeight()  : void
Sets whether the html and body tag should get 100% height attributes
setIdInputVisible()  : void
Sets the visibility of the id input field
setIEMetaCompatible()  : void
Overwrites the default meta http-equiv of the html document.
setInputIDPrefix()  : mixed
Overwrites the prefix of the fields names
setKeywordControlVisible()  : void
Sets the visibility of the keyword control
setLanguageChooserVisible()  : void
Sets the visibility of the language chooser flags
setMinimizeToContent()  : mixed
Defines whether the dialog fills 100% width and 100% height or is should minized to its contents real size.
setPaneLabel()  : void
Sets the label of the current tab, if a tab has been opened.
setPortalMode()  : void
Sets the component to the browsers portal
setPreviewImageUrl()  : void
Sets a preview image that should be displayed next to the title
setReferenceControlVisible()  : void
Sets the visibility of the reference control
setRightTitle()  : void
Sets the right part of the title label below the toolbar The title is not translated.
setRowSelectorField()  : void
Set's the name of the field hat should be considered as the primary key of the record edited
setSetting()  : mixed
Sets the value of a defined Setting for the current user
setSettingsContext()  : mixed
Sets a unique subcontext for the registry settings of the editor Each editor containing the same subcontext is using the same settings If it is not set each list with different forward-URLS has its own context
setSettingsVisible()  : mixed
Defines whether the settings buttons is visible in the toolbar
setStartTab()  : void
Defines the tab which should be opened at start
setSubTitleVisible()  : void
Sets the visibility of the the sub title line below the title By default the subtitle is visible.
setTitle()  : void
Sets the left title label below the toolbar The title is not translated. Note that this is not the title of the window.
setTitleDark()  : void
Gives the title a dark background, normally when later a toolbar is added etc.
setTitleInput()  : mixed
Sets the title to contain html and input field(s) to enter e.g. the Label.
setTitleVisible()  : void
Sets the visibility of the title line below the toolbar By default this line is visible.
setType()  : void
Changes the type of the dialog
setUniqueID()  : void
Sets the CSUniqueID for this window
setUpdateOpener()  : mixed
Activates the reload of the opener frame, if the content has been changed.
setUsageControlsVisibility()  : bool
Sets the visibility of usage controls in the toolbar.
setVisiblePanes()  : void
Limits the visible panes of this editor
setWindowTitle()  : void
Sets the window title as it is used in the heads title element
setWorkflowControlVisible()  : void
Sets the visibility of the workflow control
setZoomChooserVisible()  : void
Sets the visibility of the zoom chooser for the first tab
throwError()  : void
Throws a CSException
toolbarAddButton()  : CSGuiToolbarButton
Adds a button to the toolbar The button is displayed on the upper border of the dialog.
toolbarAddCheckboxButton()  : CSGuiToolbarButton
Adds a checkbox button to the toolbar
toolbarAddComponent()  : void
Adds an arbitrary html text with subtitle to the toolbar
toolbarAddSeparator()  : CSGuiToolbarButton
Adds a toolbar separator
toolbarAddTextfield()  : CSGuiToolbarButton
Adds a text input to the toolbar
toolbarAddUploadButton()  : CSGuiToolbarButton
Adds an upload button to the toolbar The button is displayed on the upper border of the dialog.
toolbarRemoveAllButtons()  : void
Removes all buttons from the toolbar
toolbarRemoveButton()  : void
Removes a button from the toolbar
toolbarSetRightTitle()  : void
Sets an arbitrary html text with subtitle on the right end of the toolbar
toolbarSetSize()  : void
Can be set to false if the toolbar should appear in a small version
toolbarSetVisible()  : void
Sets the visibility of the toolbar
verticalToolbarActivateRichEditor()  : mixed
Activates and creates the vertical toolbar in the editor.
verticalToolbarAddButton()  : html
Adds a button to the vertical toolbar of all tabs
verticalToolbarAddCheckboxButton()  : CSGuiToolbarButton
Adds a checkbox button
verticalToolbarAddComponent()  : void
Adds an arbitrary html code to the vertical toolbar of all tabs
verticalToolbarAddPaneButton()  : html
Adds a button to the vertical toolbar of the current tab
verticalToolbarAddPaneCheckboxButton()  : CSGuiToolbarButton
Adds a checkbox button to the toolbar of the current tab
verticalToolbarAddPaneComponent()  : void
Adds an arbitrary html code to the vertical toolbar of the current tab
verticalToolbarAddPaneSeparator()  : void
Adds a toolbar separator to the vertical toolbar of the current tab
verticalToolbarAddPaneToggleButton()  : CSGuiToolbarButton
Adds a toggle button to the toolbar of the current tab
verticalToolbarAddSeparator()  : void
Adds a toolbar separator to the vertical toolbar of all tabs
verticalToolbarAddToggleButton()  : CSGuiToolbarButton
Adds a toggle button

Properties

$additionalHead

public mixed $additionalHead = ""
Tags
access

private

$additionalJavascript

public mixed $additionalJavascript
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

$checkBeforeSaveJavascript

public mixed $checkBeforeSaveJavascript = array()
Tags
access

private

$csscodes

public mixed $csscodes = array()
Tags
access

private

public mixed $csslinks = array()
Tags
access

private

$editbuilder

public mixed $editbuilder
Tags
access

private

$editorType

public mixed $editorType
Tags
access

private

$guiTable

public mixed $guiTable
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

$menubarIsVisible

public mixed $menubarIsVisible = \true
Tags
access

private

$metaData

public mixed $metaData = array()
Tags
access

private

$rightTitle

public mixed $rightTitle = ''
Tags
access

private

$singleFormMode

public mixed $singleFormMode = \false
Tags
access

private

$subTitleIsVisible

public mixed $subTitleIsVisible = \true
Tags
access

private

$titleIsDark

public mixed $titleIsDark = \FALSE
Tags
access

private

$titleIsVisible

public mixed $titleIsVisible = \true
Tags
access

private

$toolbarIsVisible

public mixed $toolbarIsVisible = \true
Tags
access

private

$toolbarSize

public mixed $toolbarSize = \true
Tags
access

private

$visibility

public mixed $visibility = array()
Tags
access

private

$windowTitle

public mixed $windowTitle
Tags
access

private

Methods

__construct()

CSGuiEditorDialog constructor.

public __construct(string|Record $RecordName[, bool|int $type = CSGUI_EDITOR_DIALOG_TYPE_TABBEDPANE ]) : mixed
Parameters
$RecordName : string|Record
$type : bool|int = CSGUI_EDITOR_DIALOG_TYPE_TABBEDPANE
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

activateEditorLayoutMode()

Activates the editorLayoutMode which renders all inputs to be able to reuse them in with CSGuiEditorLayout components, e.g. in the frontend This method must be called before makeHtml is called

public activateEditorLayoutMode() : void
Tags
Return values
void

activateFilterInput()

Activates the filter input for the editor which allows to dynamically filter options. This concept currently does not work properly when delayed pane loading is activated.

public activateFilterInput([bool $bActivate = true ]) : void
Parameters
$bActivate : bool = true

True, if the filter input should be activated, otherwise false.

Tags
access

public

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

activateTabLayout()

activates tab layout for the editor dialog (allows to place fields inside of custom tabs and/or sections)

public activateTabLayout([bool $activate = true ]) : void
Parameters
$activate : bool = true

whether to activate this feature or not

Tags
Return values
void

addBeforeSaveJSCode()

Adds javascript code which should be evaluated with eval before save. If it is evaluated to false, the save is aborted.

public addBeforeSaveJSCode(string $checkForSaveJavascript[, mixed $index = null ]) : mixed
Parameters
$checkForSaveJavascript : string
$index : mixed = null
Tags
access

public

Return values
mixed

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

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 = '' ][, string $id = '' ][, string $icon = '' ]) : 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

$visibility : string = ''

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

$id : string = ''

The id of the section pane.

$icon : string = ''

The icon which should be shown in the section pane sidebar.

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

addField()

Adds a field to the editor definition

public addField(string $name[, string|array<string|int, mixed> $label = '' ][, string $type = '' ][, string $default = '' ][, bool $disabled = false ][, array<string|int, mixed> $additionalOptions = array() ]) : void
Parameters
$name : string

the name of the field

$label : string|array<string|int, mixed> = ''

the label of the field, if array given, the second bucket will be taken for tooltip

$type : string = ''

the type of the field as documented at

$default : string = ''

the default value of this field when the editor creates a new record

$disabled : bool = false

whether the input field should be disabled

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

further option as documented at

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

addHiddenInput()

Adds a hidden input field to the Editor

public addHiddenInput(string $name[, string $value = '' ][, string $id = '' ][, mixed $sAdditionalAttributes = '' ]) : mixed
Parameters
$name : string

the name of the input

$value : string = ''

the value of the input

$id : string = ''

the optional ID of the input

$sAdditionalAttributes : mixed = ''
Tags
Return values
mixed

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 = '' ][, string $id = '' ][, string $icon = '' ]) : 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)

$id : string = ''

The id of the section pane.

$icon : string = ''

The icon which should be shown in the section pane sidebar.

Tags
access

public

Return values
SectionPaneSection

addIFramePane()

Adds a special sub pane that contains an iframe and activates the output buffering to catch content for the pane area

public addIFramePane(string $title, string $src[, string $onClick = '' ]) : string

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. The arguments are passed to the corresponding pane. Therfore an image can be used as forth parameter for CSGuiTreePanes and CSGuiSwitchPanes.

Parameters
$title : string

the label of the pane

$src : string

the url of the pane

$onClick : string = ''

additional javascript code to be evaluated onClick

Tags
access

public

Return values
string

the ID of the IFrame

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

addPane()

Adds a sub pane and activates the output buffering to catch content for the pane area The arguments are passed to the corresponding pane. Therfore an image can be used as third parameter for CSGuiTreePanes and CSGuiSwitchPanes.

public addPane(string $title[, string $onClick = '' ]) : void
Parameters
$title : string

the label of the pane

$onClick : string = ''

javascript code to be evaluated onClick

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

addRightTitle()

Adds content to the right part of the title label below the toolbar The title is not translated.

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

the title of the caption below the toolbar

Tags
access

public

Return values
void

addSetting()

Adds a field to the list settings dialog

public addSetting(string $name[, string $label = '' ][, string $type = '' ][, string $default = '' ][, array<string|int, mixed> $additionalOptions = array() ]) : void
Parameters
$name : string

the name of the field

$label : string = ''

the label of the field

$type : string = ''

the type of the field as documented at

$default : string = ''

the default value of this field when the editor creates a new record

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

further option as documented at

Tags
access

public

Return values
void

addWhitePane()

Adds a white sub pane and activates the output buffering to catch content for the pane area.

public addWhitePane(string $title[, string $onClick = '' ]) : void

The arguments are passed to the corresponding pane. Therfore an image can be used as third parameter for CSGuiTreePanes and CSGuiSwitchPanes.

Parameters
$title : string

the label of the pane

$onClick : string = ''

javascript code to be evaluated onClick

Tags
access

public

Return values
void

changeField()

Changes the field definition of a field

public changeField(string $name[, string $label = '' ][, string $type = '' ][, string $default = '' ][, bool $disabled = false ][, array<string|int, mixed> $additionalOptions = array() ]) : void
Parameters
$name : string

the name of the field

$label : string = ''

the label of the field

$type : string = ''

the type of the field as documented at

$default : string = ''

the default value of this field when the editor creates a new record

$disabled : bool = false

whether the input field should be disabled

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

further option as documented at

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

enableLoadOnDemandContent()

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

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

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

Parameters
$enabled : bool = true

whether the preloading should be enabled

Tags
access

public

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

enableSavingContentFromInnerFrames()

Sets the editor to save content from within iframes, if they have implemented one of the following methods: - function csBuilderMaySave() {} prepares the iframe for storage and returns whether the outer frame may be stored or not - function getFormForSaving() {} returns the form from which all elements should be copied to the original form which is stored

public enableSavingContentFromInnerFrames() : void
Tags
access

public

Return values
void

generateDefaultToolbar()

public generateDefaultToolbar() : mixed
Tags
access

protected

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

getCurrentAction()

Returns the action is has been executed before, e.g. store, checkin, checkout, .

public getCurrentAction() : string

..

Tags
Return values
string

the current action

getEditorLayout()

Returns the CSGuiEditorLayout component representing the current editor It is recommended to call the makeHtml method before to create all dynamic fields This object can be used to create a representation of the editor in the frontend changing the layout but reusing the logic

public getEditorLayout() : CSGuiEditorLayout
Tags
Return values
CSGuiEditorLayout

the layout object

getEditUrl()

Returns the current editURL

public getEditUrl() : string
Tags
access

public

Return values
string

the url which is called during actions and refreshes

getFieldKeyDetails()

returns details for the key of an editor field (e.g. CS_ItemAttribute_0_20_1

public getFieldKeyDetails(string $key) : array<string|int, mixed>
Parameters
$key : string

the key for which the details should be retrieved

Tags
access

public

Return values
array<string|int, mixed>

the key details

getFormName()

Gets the name for the edit form

public getFormName() : string
Tags
access

public

Return values
string

the new name of the form

getGeneralPaneTitle()

public getGeneralPaneTitle() : mixed
Tags
access

protected

Return values
mixed

getGuiSplitArea()

Returns the CSGuiSplitArea around the content where one can add components to the left, top, bottom or right.

public getGuiSplitArea() : CSGuiSplitArea

Right is only possible, if no control pane is available.

Tags
access

public

Return values
CSGuiSplitArea

the splitarea which can be manipulated

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

getInputID()

Returns the id for the input which can be referenced by using javascript

public getInputID(string $name) : string
Parameters
$name : string

the name of the field

Tags
access

public

Return values
string

the id of the input element

getLanguageFlagImage()

Returns the separator for the language flag, if the record supports languages. It will be replaced later by the correct flag.

public getLanguageFlagImage() : string
Tags
access

public

Return values
string

a html code containing the image

getRecord()

Returns a reference of the current record which is used in the editbuilder

public getRecord() : Record
Tags
access

public

Return values
Record

the current record

getSetting()

Returns the value of a defined Setting for the current user

public getSetting(string $name[, string $default = '' ]) : string
Parameters
$name : string

the name of the setting

$default : string = ''

the default value if no value is set

Tags
access

public

Return values
string

the defined value of the setting

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

hasAlreadyBeenSend()

This method can be called to check whenever a request is send to the CSGui Editor before.

public hasAlreadyBeenSend() : bool

Therefore a unique ID is added to the getEditUrl() which can be used to call actions. If the a request has the same ID, it is supposed, that the user presses the refresh button. Often this may not execute the action another time. Therefore this method can be called before, to ensure that the request has been send the first time.

Tags
access

public

Return values
bool

whether the request has already been send

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

isSavable()

Returns whether the editor is savable at the moment

public isSavable() : bool
Tags
access

public

Return values
bool

whether one can save the current editor

makeAllFieldsHtml()

Creates the html representation of all the current fields within the edit form in a default table This function creates all defined input components with a label and adds them to the current CSGuiTable

public makeAllFieldsHtml() : CSGuiTable
Tags
access

public

Return values
CSGuiTable

the current CSGuiTable reference

makeBody()

public makeBody() : mixed
Tags
access

protected

Return values
mixed

makeFieldHtml()

Creates the html representation for the labeld input object including a complete table row This function creates input component with a label and adds it to the current CSGuiTable

public makeFieldHtml(string $name[, mixed $label = '' ][, string $type = '' ][, string $default = '' ][, bool $disabled = false ][, string $style = '' ][, array<string|int, mixed> $additionalOptions = array() ]) : CSGuiTable
Parameters
$name : string

the name of the field

$label : mixed = ''

the label of the field either a string or a array containing two values (label and description)

$type : string = ''

the type of the field as documented at

$default : string = ''

the default value of this field when the editor creates a new record

$disabled : bool = false

whether the input field should be disabled if the editor is editable.

$style : string = ''

additional style to be applied to the input

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

further option as documented at

Tags
see
makeInputFieldHtml()
access

public

Return values
CSGuiTable

the current CSGuiTable reference

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

makeInputFieldHtml()

Creates the html representation for the pure input object of a specific named field This function creates only the input component without a label

public makeInputFieldHtml(string $name[, string $type = '' ][, string $default = '' ][, bool $disabled = false ][, bool $style = '' ][, array<string|int, mixed> $additionalOptions = array() ]) : string
Parameters
$name : string

the name of the field

$type : string = ''

the type of the field as documented at

$default : string = ''

the default value of this field when the editor creates a new record

$disabled : bool = false

whether the input field should be disabled

$style : bool = ''

additional style to be applied to the input

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

further option as documented at

Tags
see
makeFieldHtml()
access

public

Return values
string

the html representation of the input component

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

menubarAddHandle()

Adds a handle as next item in the dialogs Menubar

public menubarAddHandle() : void
Tags
access

public

Return values
void

menubarAddHelp()

Adds a help popup menu to the dialogs Menubar

public menubarAddHelp([string $module = '' ]) : void
Parameters
$module : string = ''

the module for which the help should be displayed

Tags
access

public

Return values
void

menubarAddItem()

Adds a menu entry to the dialogs Menubar

public menubarAddItem(string $label, string $javascript[, string $img = "" ][, string $menubar = 'GUI_MENU_FILE' ]) : void
Parameters
$label : string

the label which is displayed in the entry

$javascript : string

the javascript code which is executed when clickin on the entry

$img : string = ""

the image of the popup relative to the images/popup folder

$menubar : string = 'GUI_MENU_FILE'

the label which is displayed in the menu

Tags
access

public

Return values
void

Adds a menu to the dialogs Menubar, which represents a link

public menubarAddLink(string $label[, string $href = '#' ][, string $target = '' ][, string $onClick = '' ][, string $accesskey = '' ]) : void
Parameters
$label : string

the label which is displayed in the menu

$href : string = '#'

the href of the link

$target : string = ''

the target frame of the link

$onClick : string = ''

the javascript code which is called when clicking on the link

$accesskey : string = ''

the keybord access key of the menu

Tags
access

public

Return values
void

menubarAddMenu()

Adds a popup menu to the dialogs Menubar, which request a popup menu from the server if it is clicked

public menubarAddMenu(string $id, string $label[, string $src = '' ][, string $accesskey = '' ]) : void
Parameters
$id : string

the id which is added to the popup request

$label : string

the label which is displayed in the menu

$src : string = ''

the url where the popup is requested from. If it is not set the url definied with the menubarSetUrl method is taken.

$accesskey : string = ''

the keybord access key of the menu

Tags
access

public

Return values
void

menubarAddPopup()

Adds a popup menu to the dialogs Menubar. If there had been already one popup defined with the same label this popup is appended to it.

public menubarAddPopup(string $label[, CSGuiComponent $popup = null ][, string $accesskey = '' ]) : void
Parameters
$label : string

the label which is displayed in the menu.

$popup : CSGuiComponent = null

the CSGuiComponent which contains the Popup or null if it is the popup defined in the dialog

$accesskey : string = ''

the keybord access key of the menu

Tags
access

public

Return values
void

menubarAddUploadItem()

Adds an upload button to the menubar The button is displayed on the upper border of the dialog.

public menubarAddUploadItem(string $title, string $onUpload[, string $image = '' ][, array<string|int, mixed> $allowedFileTypes = array() ]) : CSGuiToolbarButton
Parameters
$title : string

the label of the button

$onUpload : string

the javascript to execute where the javascript variable 'filePath' contains the path to the uploaded file

$image : string = ''

the image file relative to the admin/images/toolbar directory

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

the filetypes which may be uploaded

Tags
access

public

Return values
CSGuiToolbarButton

menubarIsCollapsed()

Tells if the menubar is collapsed, either by explicitly calling the setCollapsed method or by the default settings in the skin options.

public menubarIsCollapsed() : bool
Tags
Return values
bool

true if collapsed, false otherwise

menubarRemoveAllMenus()

Removes all menus from the dialogs Menubar

public menubarRemoveAllMenus() : void
Tags
access

public

Return values
void

menubarSetCollapsed()

Collapses the menubar into a toolbar button with context menu

public menubarSetCollapsed([bool $boolean = true ]) : mixed
Parameters
$boolean : bool = true
Tags
Return values
mixed

menubarSetRightTitle()

Sets an arbitrary html text on the right end of the menubar

public menubarSetRightTitle(string $title[, string $tooltip = '' ]) : void
Parameters
$title : string

the text in the menubar

$tooltip : string = ''

the tooltip of the title text in the menubar

Tags
access

public

Return values
void

menubarSetShowInTreeButtonVisible()

Sets the visibility of the "Show In Tree" menubar entry.

public menubarSetShowInTreeButtonVisible([bool $bVisible = true ]) : void
Parameters
$bVisible : bool = true
Tags
Return values
void

menubarSetUrl()

Changes the url where the menubar should be loaded from when using the menubarAddMenu function.

public menubarSetUrl([string $menubarUrl = '' ]) : 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
$menubarUrl : string = ''

the url where the menubar popups are defined

Tags
access

public

Return values
void

menubarSetVisible()

Sets the visibility of the menubar

public menubarSetVisible(bool $boolean) : void

By default the menubar is visible but can be hidden with this method.

Parameters
$boolean : bool

whether to show the menubar or not

Tags
access

public

Return values
void

newGuiTable()

Creates a new gui table to add new elements to

public newGuiTable([mixed $isLast = true ][, int $iCount = 1 ]) : CSGuiTable
Parameters
$isLast : mixed = true
$iCount : int = 1

number of sections in the current view. If only 1 section is shown we are spreading it to 100% height.

Tags
access

public

Return values
CSGuiTable

the new CSGuiTable object

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

reinit()

Reload the editor for a new record.

public reinit(int $newID) : mixed

If the visible record should be changed after having initalized the editor this method may be used, to display the editor for an other record

Parameters
$newID : int

the ID of the new record which should be displayed in the Editor

Tags
Return values
mixed

removeAllFields()

Completely removes all fields from the editor definition

public removeAllFields() : void
Tags
access

public

Return values
void

removeField()

Removes a field from the editor definition

public removeField(string $name) : void
Parameters
$name : string

the name of the field to remove

Tags
access

public

Return values
void

removePane()

Removes all fields from a Pane or a Section from the dialog

public removePane(string $paneTitle[, string $sectionTitle = null ]) : void
Parameters
$paneTitle : string

the name of the Pane to remove

$sectionTitle : string = null

the optional name of the section to remove

Tags
Return values
void

setAcceptMode()

Set's whether the save button (checkin button if the record can be checked out) automatically closes the window

public setAcceptMode([bool $saveAndClose = true ]) : void
Parameters
$saveAndClose : bool = true

whether saving should close the window

Tags
access

public

Return values
void

setAccessLevelControlVisible()

Sets the visibility of the access level control

public setAccessLevelControlVisible([bool $boolean = true ]) : void
Parameters
$boolean : bool = true

the visibility of the access level control

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

setAjaxSubmit()

Sets whether the editor should be submitted using Ajax

public setAjaxSubmit(mixed $activated[, bool $synchron = false ]) : mixed
Parameters
$activated : mixed
$synchron : bool = false

whether the ajax submit (if enabled should be synchron)

Tags
Return values
mixed

setAttachmentControlVisible()

Sets the visibility of the attachement control

public setAttachmentControlVisible([bool $boolean = true ]) : void
Parameters
$boolean : bool = true

the visibility of the attachement control

Tags
access

public

Return values
void

setAttributeDisabledOnFields()

Enables the use of html attribute disabled on fields (input, select, etc) This method works only for simple fields (Types supported on Reference Dialog)

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

allow the use of fields with attribute disabled='disabled'

Tags
access

public

Return values
void

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

setCharset()

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

public setCharset(mixed $charset[, mixed $changeLocale = true ]) : void
Parameters
$charset : mixed

the charset to use for the document

$changeLocale : mixed = true

whether the new characterset should be applied to all translations

Tags
access

public

Return values
void

setClassName()

Changes the cascading style sheet class base name of the editor components

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

the class base name to use for the editor components

Tags
access

public

Return values
void

setCloneable()

Set's the editor dialog to be clonable

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

whether the editor should be clonable

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

setDefaultColumnCount()

public setDefaultColumnCount([mixed $columnCount = 1 ]) : mixed
Parameters
$columnCount : mixed = 1
Tags
Return values
mixed

setDefaultConfiguration()

public setDefaultConfiguration() : mixed
Tags
access

private

Return values
mixed

setDeletable()

Set's the editor dialog to be deletable

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

whether the editor should be deletable

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

setEditable()

Set's the editor dialog to be storable

public setEditable(bool $boolean[, bool $disableAllElements = null ][, bool $ignoreRights = false ]) : void
Parameters
$boolean : bool

whether the editor should be storable

$disableAllElements : bool = null

whether all elements should be disabled. If it is null it is true if $boolean is false

$ignoreRights : bool = false

whether the editor should ignore standard rights, e.g. whether the record is checked out

Tags
access

public

Return values
void

setEditUrl()

Set's the base url of the editor dialog in order to restore additional parameters

public setEditUrl([string $editUrl = "" ][, array<string|int, mixed> $useRequestParams = array() ]) : void
Parameters
$editUrl : string = ""

the base url of the editor

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

an array of params which should be reused to complete the url

Tags
access

public

Return values
void

setEnctype()

Sets the encoding type for the editors form

public setEnctype([string $enctype = 'text/plain' ]) : void
Parameters
$enctype : string = 'text/plain'

the forms encoding type

Tags
Return values
void

setFieldContextRestoreOnLoad()

Activates the keep scroll position for the editor

public setFieldContextRestoreOnLoad([bool $bActivate = true ]) : void
Parameters
$bActivate : bool = true

True, if the keep scroll position should be activated, otherwise 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[, bool $showControlFrame = null ]) : void
Parameters
$force : bool

if true the states are not stored in a cookie

$showControlFrame : bool = null

whether the controlFrame should be opened per default. If it is set to null, the state is stored in a cookie

Tags
access

public

Return values
void

setFormName()

Sets the name for the form

public setFormName(string $name) : void
Parameters
$name : string

the new name of the form

Tags
access

public

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

setIdInputVisible()

Sets the visibility of the id input field

public setIdInputVisible([bool $boolean = true ]) : void
Parameters
$boolean : bool = true

the visibility of the id input field

Tags
access

public

Return values
void

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

setInputIDPrefix()

Overwrites the prefix of the fields names

public setInputIDPrefix([string $prefix = '' ]) : mixed
Parameters
$prefix : string = ''

the new field prefix

Tags
access

public

Return values
mixed

setKeywordControlVisible()

Sets the visibility of the keyword control

public setKeywordControlVisible([bool $boolean = true ]) : void
Parameters
$boolean : bool = true

the visibility of the keyword control

Tags
access

public

Return values
void

setLanguageChooserVisible()

Sets the visibility of the language chooser flags

public setLanguageChooserVisible([bool $boolean = true ]) : void
Parameters
$boolean : bool = true

the visibility of the language chooser flags

Tags
access

public

Return values
void

setMinimizeToContent()

Defines whether the dialog fills 100% width and 100% height or is should minized to its contents real size.

public setMinimizeToContent([mixed $minimizeMode = true ]) : mixed
Parameters
$minimizeMode : mixed = true
Tags
Return values
mixed

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

setPreviewImageUrl()

Sets a preview image that should be displayed next to the title

public setPreviewImageUrl(string $sPreviewImageUrl) : void
Parameters
$sPreviewImageUrl : string

the URL of the image

Tags
Return values
void

setReferenceControlVisible()

Sets the visibility of the reference control

public setReferenceControlVisible([bool $boolean = true ]) : void
Parameters
$boolean : bool = true

the visibility of the reference control

Tags
access

public

Return values
void

setRightTitle()

Sets the right part of the title label below the toolbar The title is not translated.

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

the title of the caption below the toolbar

Tags
access

public

Return values
void

setRowSelectorField()

Set's the name of the field hat should be considered as the primary key of the record edited

public setRowSelectorField(string $getName) : void

Normally this field name is automatically selected based on the ID field of the edited record. However, if you need to open the editor based on any other field set this field name here properly.

Parameters
$getName : string

the name of the field with the primary key

Tags
access

public

Return values
void

setSetting()

Sets the value of a defined Setting for the current user

public setSetting(string $name, string $value[, bool $permanently = false ]) : mixed
Parameters
$name : string

the name of the setting

$value : string

the new value

$permanently : bool = false

(default: false) whether this setting should be stored permanently

Tags
access

public

Return values
mixed

setSettingsContext()

Sets a unique subcontext for the registry settings of the editor Each editor containing the same subcontext is using the same settings If it is not set each list with different forward-URLS has its own context

public setSettingsContext(string $subcontext) : mixed
Parameters
$subcontext : string

the subcontext

Tags
Return values
mixed

setSettingsVisible()

Defines whether the settings buttons is visible in the toolbar

public setSettingsVisible(bool $visible) : mixed
Parameters
$visible : bool

whether the settings may be changed by the users

Tags
access

public

Return values
mixed

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

setSubTitleVisible()

Sets the visibility of the the sub title line below the title By default the subtitle is visible.

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

whether the sub title should be visible or not

Tags
access

public

Return values
void

setTitle()

Sets the left title label below the toolbar The title is not translated. Note that this is not the title of the window.

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

the title of the caption below the toolbar

Tags
access

public

Return values
void

setTitleDark()

Gives the title a dark background, normally when later a toolbar is added etc.

public setTitleDark([bool $boolean = TRUE ]) : void
Parameters
$boolean : bool = TRUE

whether the title should be dark, default TRUE

Tags
access

public

Return values
void

setTitleInput()

Sets the title to contain html and input field(s) to enter e.g. the Label.

public setTitleInput(string $html, mixed $name) : mixed

Multiple html and fields can be set by adding further parameters, e.g. setInputTitle('PrefixText', 'Label', 'SuffixTest') or e.g. setInputTitle('Text1', 'Field1', 'Text2', 'Field2', ...)

Parameters
$html : string

html content

$name : mixed

the name of the field as string to be displayed as textfield or an array with 1 to 3 arguments ($name, $type = '', $additionalOptions=array())

Tags
Return values
mixed

setTitleVisible()

Sets the visibility of the title line below the toolbar By default this line is visible.

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

whether the title line below the toolbar should be visible or not

Tags
access

public

Return values
void

setType()

Changes the type of the dialog

public setType([mixed $type = CSGUI_DIALOG_TYPE_WHITE_PADDING ]) : void
Parameters
$type : mixed = CSGUI_DIALOG_TYPE_WHITE_PADDING
Tags
access

public

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

setUpdateOpener()

Activates the reload of the opener frame, if the content has been changed.

public setUpdateOpener([bool $doReload = true ][, bool $alwaysReload = false ]) : mixed

This is disabled by default for performance reasons

Parameters
$doReload : bool = true

whether the opener frame should be reloaded when the record has been changed

$alwaysReload : bool = false

whether the opener frame should always be reloaded. Otherwise it will only be reloaded, if the record is new or deleted.

Tags
Return values
mixed

setUsageControlsVisibility()

Sets the visibility of usage controls in the toolbar.

public setUsageControlsVisibility([bool $bVisible = true ]) : bool
Parameters
$bVisible : bool = true

If true, the usage controls are visible, otherwise not.

Tags
access

public

Return values
bool

The previous visibility state.

setVisiblePanes()

Limits the visible panes of this editor

public setVisiblePanes([array<string|int, mixed> $visiblePanes = array() ][, array<string|int, mixed> $hiddenPanes = array() ]) : void
Parameters
$visiblePanes : array<string|int, mixed> = array()

the panes which should only be visible. If empty there is no white list limitation

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

the panes which should never be visible. If empty there is no black list limitation

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

setWorkflowControlVisible()

Sets the visibility of the workflow control

public setWorkflowControlVisible([bool $boolean = true ]) : void
Parameters
$boolean : bool = true

the visibility of the workflow control

Tags
access

public

Return values
void

setZoomChooserVisible()

Sets the visibility of the zoom chooser for the first tab

public setZoomChooserVisible([bool $boolean = true ]) : void
Parameters
$boolean : bool = true

the visibility of the zoom chooser for the first tab

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

toolbarAddButton()

Adds a button to the toolbar The button is displayed on the upper border of the dialog.

public toolbarAddButton(string $image, string $title[, string $href = '#' ][, string $target = '_self' ][, string $onclick = '' ][, string $accesskey = '' ][, string $menubar = 'GUI_MENU_FILE' ][, string $additionalAttributes = '' ][, string $index = -1 ]) : CSGuiToolbarButton
Parameters
$image : string

the image file relative to the admin/images/toolbar directory

$title : string

the label of the button

$href : string = '#'

the url to open on click

$target : string = '_self'

the target of the opened url

$onclick : string = ''

javascript code to be evaluated on click

$accesskey : string = ''

the keybord access key of the button

$menubar : string = 'GUI_MENU_FILE'

the popupmenu in the menubar the button should be displayed or '' if it should not be displayed

$additionalAttributes : string = ''

additional attributes which should be added to the button

$index : string = -1

either the index as a number or in the form GUI_MENU_UPDATE+1 to define the position of the toolbar button in the toolbar. If set to -1 it is appended to the end

Tags
access

public

Return values
CSGuiToolbarButton

the defined button

toolbarAddCheckboxButton()

Adds a checkbox button to the toolbar

public toolbarAddCheckboxButton(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 $menubar = 'GUI_MENU_FILE' ][, string $additionalAttributes = '' ][, 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

$menubar : string = 'GUI_MENU_FILE'

the popupmenu in the menubar the button should be displayed or '' if it should not be displayed

$additionalAttributes : string = ''

additional attributes which should be added to the button

$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

toolbarAddComponent()

Adds an arbitrary html text with subtitle to the toolbar

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

the text in the first line

$title : string = "&nbsp;"

the text in the second line

Tags
access

public

Return values
void

toolbarAddTextfield()

Adds a text input to the toolbar

public toolbarAddTextfield(string $name, string $onsubmit[, string $title = '' ][, string $id = '' ][, string $visibility = '' ]) : CSGuiToolbarButton
Parameters
$name : string

the name of the textfield

$onsubmit : string

the js code which is called when pressing enter

$title : string = ''

the text or tooltip title next to the textfield

$id : string = ''

the id of the input

$visibility : string = ''

the visibility with the form GROUP:NAME

Tags
access

public

Return values
CSGuiToolbarButton

the created button object

toolbarAddUploadButton()

Adds an upload button to the toolbar The button is displayed on the upper border of the dialog.

public toolbarAddUploadButton(string $title, string $onUpload[, string $image = '' ][, array<string|int, mixed> $allowedFileTypes = array() ]) : CSGuiToolbarButton
Parameters
$title : string

the label of the button

$onUpload : string

the javascript to execute where the javascript variable 'filePath' contains the path to the uploaded file

$image : string = ''

the image file relative to the admin/images/toolbar directory

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

the filetypes which may be uploaded

Tags
access

public

Return values
CSGuiToolbarButton

toolbarRemoveAllButtons()

Removes all buttons from the toolbar

public toolbarRemoveAllButtons() : void
Tags
access

public

Return values
void

toolbarRemoveButton()

Removes a button from the toolbar

public toolbarRemoveButton(string $name) : void
Parameters
$name : string

the name of the toolbar to remove

Tags
access

public

Return values
void

toolbarSetRightTitle()

Sets an arbitrary html text with subtitle on the right end of the toolbar

public toolbarSetRightTitle(string $menubarTitle[, string $toolbarTitle = '' ][, mixed $tooltip = '' ]) : void
Parameters
$menubarTitle : string

the text in the menubar

$toolbarTitle : string = ''

the text in the toolbar

$tooltip : mixed = ''
Tags
access

public

Return values
void

toolbarSetSize()

Can be set to false if the toolbar should appear in a small version

public toolbarSetSize([bool $large = true ]) : void
Parameters
$large : bool = true

whether to use the large or small toolbar

Tags
access

public

Return values
void

toolbarSetVisible()

Sets the visibility of the toolbar

public toolbarSetVisible(bool $boolean) : void

By default the toolbar is visible but can be hidden with this method.

Parameters
$boolean : bool

whether to show the toolbar or not

Tags
access

public

Return values
void

verticalToolbarActivateRichEditor()

Activates and creates the vertical toolbar in the editor.

public verticalToolbarActivateRichEditor() : mixed

In toolbar element (id) the rich editor will load his own toolbar.

Tags
Return values
mixed

Either bool FALSE or the id of the toolbar element.

verticalToolbarAddButton()

Adds a button to the vertical toolbar of all tabs

public verticalToolbarAddButton(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

verticalToolbarAddCheckboxButton()

Adds a checkbox button

public verticalToolbarAddCheckboxButton(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 $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 : mixed = ''
$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

verticalToolbarAddComponent()

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

public verticalToolbarAddComponent(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

verticalToolbarAddPaneButton()

Adds a button to the vertical toolbar of the current tab

public verticalToolbarAddPaneButton(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

verticalToolbarAddPaneCheckboxButton()

Adds a checkbox button to the toolbar of the current tab

public verticalToolbarAddPaneCheckboxButton(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 $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 : 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

verticalToolbarAddPaneComponent()

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

public verticalToolbarAddPaneComponent(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

verticalToolbarAddPaneSeparator()

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

public verticalToolbarAddPaneSeparator() : void
Tags
access

public

Return values
void

verticalToolbarAddPaneToggleButton()

Adds a toggle button to the toolbar of the current tab

public verticalToolbarAddPaneToggleButton(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

verticalToolbarAddSeparator()

Adds a toolbar separator to the vertical toolbar of all tabs

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

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

Tags
access

public

Return values
void

verticalToolbarAddToggleButton()

Adds a toggle button

public verticalToolbarAddToggleButton(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


        

Search results