Contentserv PHP API

CSGuiItemComparatorTable extends CSGuiTable

The CSGuiTable implements a table object, where one can add Rows which all have a common look and feel

This class has no public constructor, use the factory method instead.

Tags

Table of Contents

FILTER_TYPE_NONE  = 0
FILTER_TYPE_SELECTION  = 1
FILTER_TYPE_TEXT  = 2
$_id  : mixed
$_isFilterable  : mixed
$_sortingCallback  : mixed
$classes  : mixed
$columnCount  : mixed
$count  : mixed
$displayFinalRow  : mixed
$fillEmptyCells  : mixed
$invisibleText  : mixed
$isDisabled  : mixed
$isManuallySortable  : mixed
$isPhpSort  : mixed
$isPortal  : mixed
$isSelectable  : mixed
$isSortable  : mixed
$popup  : mixed
$popupIDField  : mixed
$popupUrl  : mixed
$rowClassPrefix  : mixed
$rows  : mixed
$style  : mixed
$tableClass  : mixed
__construct()  : mixed
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.
addHeaderRow()  : void
Creates a new header row in the table. Similar to {@link addRow} where the type is th
addInvisibleHtml()  : void
Sometimes it is necessary to add invisible html content when building a table, which should not be displayed in a own row, e.g. hidden input fields or script. It is possible to add those content using this method.
addJSAPI()  : void
Preloads a js API library instead of using CS.loadAPI in the code
addJSCode()  : void
Adds a js code snippet to the windows internal js scripts as they are used in the head or directly to the component
addJSLink()  : void
Adds a link to the windows external js scripts Note that the link to the file is from the browsers point of view relative to the forward.php
addJSUtils()  : void
Preloads a js util library instead of using CS.loadUtils in the code
addRow()  : void
Creates a new row in the table
addSeparator()  : mixed
Adds a little row which can be used as separator
addTableClass()  : void
Adds additional CSS Class(es) to the table itself.
changeRowAtIndex()  : array<string|int, mixed>
This method allows it to manipulate an existing table row. For parameter definition see CSGuiTable::addRow method.
deactivateDragIcon()  : void
deactivates the drag icon that is shown if a row has a drag id
enableJQuery()  : void
Enables JQuery by loading all required libraries
enableJQueryEasy()  : void
Enables JQuery easy by loading all required libraries (experimental only)
enableJQueryPlugin()  : bool
Enables jQuery plugin.
enableJQueryUI()  : void
Enables JQuery UI by loading all required libraries (experimental only)
enablePluginCalls()  : mixed
Enables / disables all calls to CSGuiComponent plugins, if it is not wanted
getColumnCount()  : int
Returns the maximum column count in the table
getComparatorData()  : CSItemComparatorData
getController()  : object
returns the controller of this gui component
getID()  : string
Gets the id of this table
getRowCount()  : int
Returns the amount of rows defined within the table
isPortal()  : bool
Returns whether the component is used in the portal
loadCSVData()  : count
Loads a csv data array into the table
loadCSVFile()  : count
Loads a csv file into the table
makeForwardUrl()  : mixed
makeHtml()  : string
Returns the html representation of the GuiTable
makeJavaScript()  : mixed
makeOutput()  : mixed
makeRow()  : mixed
makeRows()  : mixed
popupAddCheckboxItem()  : void
Adds a checkbox popup item to the end of the current component's popup
popupAddItem()  : void
Adds a popup item to the end of the current component's popup
popupAddJavascriptFunction()  : void
Adds a Javascript method to the components Javascript which can be used to display a popup.
popupAddSeparator()  : void
Adds a popup separator item to the end of the current component's popup
popupAddSubMenuDefinition()  : void
Adds a definition (Icon, GroupIdentifier, GroupIndex) for a sub menu entry.
popupEnableDebugMode()  : mixed
popupEvaluateCode()  : mixed
Provides a condition which must be true if the popup item should be available
popupGetJavascript()  : string
Creates a javascript onContext='...' code, which can be inserted in a html component
popupGetMultipleRequestID()  : bool
This function may be used to check whether the request is a popupRequest for multiple elements.
popupGetRequestID()  : string
If a user request a popup the id describing the kind of request is returned here This function may also be used to check whether the request is a popupRequest.
popupInsertItem()  : void
Adds a popup item into a specified location of the current component's popup
popupMakeHtml()  : mixed
Creates the final popup html code
popupRemoveAllItems()  : void
Completely removes all popup items from the component
popupRemoveItem()  : void
Remove one items from the popup for the component
popupRemoveItemsByNamespace()  : void
Remove multiple from the popup specified by the namespace. All items having all the passed namespaces will be removed even if they are having more than the passed.
popupSetCharset()  : string
Sets the encoding for the popup components
popupSetDefaultPopup()  : void
Sets the default popup for the component
popupSetRequestID()  : void
Overwrites the id returned by popupSetRequestID
popupSetUrl()  : void
Changes the url where the popup should be loaded from.
popupSetVisible()  : void
Enables or disables the visiblity of the popup.
popupUseDefaultItem()  : void
Adds a standard popup item to the end of the current component's popup
removeAllRows()  : void
Removes all rows from the table instance.
removeEmptyColumns()  : void
Removes all colums which are empty for all rows
removeRowAtIndex()  : array<string|int, mixed>
Removes the row at the specified index.
setColumnCount()  : void
sets the column count for the table
setComparatorData()  : mixed
setController()  : void
sets the controller for the gui component
setDisplayFinalRow()  : void
Sets whether the last row in the table should fill the remaining height
setFillEmptyCells()  : void
Sets whether to fill empty cells at the end of a row to avoid not formatted cells
setFilterable()  : void
Sets whether the table is filterable or not
setID()  : void
sets the id for this table
setOnBeforeClick()  : void
sets a global before onclick function that is executed every time before a row is clicked.
setOnClick()  : void
sets a global onclick function that is executed every time a row is clicked
setOnDrag()  : void
sets a global on drag handler for dragging operations inside the table
setOnDragEnd()  : void
sets a global on drag end handler for dragging operations inside the table
setOnDragEnter()  : void
sets a global on drag enter handler for dragging operations inside the table
setOnDragLeave()  : void
sets a global on drag leave handler for dragging operations inside the table
setOnDragOver()  : void
sets a global on drag over handler for dragging operations inside the table
setOnDragStart()  : void
sets a global on drag start handler for dragging operations inside the table
setOnDrop()  : void
sets a global on drop handler for dragging operations inside the table
setPortalMode()  : void
Sets the component to the browsers portal
setRowClassPrefix()  : void
Sets the classname for the rows of the table.
setSelectable()  : void
Sets whether a row which is clicked should be displayed as selected
setSortable()  : void
Sets whether the table is sortable or not
setSortingCallback()  : void
sets a callback function for sorted columns
setStyle()  : void
Sets the style for the complete table
throwError()  : void
Throws a CSException

Constants

FILTER_TYPE_NONE

public mixed FILTER_TYPE_NONE = 0
Tags

FILTER_TYPE_SELECTION

public mixed FILTER_TYPE_SELECTION = 1
Tags

FILTER_TYPE_TEXT

public mixed FILTER_TYPE_TEXT = 2
Tags

Properties

$_isFilterable

public mixed $_isFilterable = array('isFilterable' => self::FILTER_TYPE_NONE, 'jsCode' => '')
Tags

$_sortingCallback

public mixed $_sortingCallback = \null
Tags

$columnCount

public mixed $columnCount = 0
Tags

$displayFinalRow

public mixed $displayFinalRow = \true
Tags

$fillEmptyCells

public mixed $fillEmptyCells = \false
Tags

$invisibleText

public mixed $invisibleText = ""
Tags

$isDisabled

public mixed $isDisabled = \false
Tags
access

private

$isManuallySortable

public mixed $isManuallySortable = \false
Tags

$isPhpSort

public mixed $isPhpSort = \false
Tags

$isSortable

public mixed $isSortable = \false
Tags

$rowClassPrefix

public mixed $rowClassPrefix = ""
Tags

Methods

addCSSCode()

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

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

the code of the css without any <style> elements

Tags
access

public

Return values
void

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

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

the href of the css file

Tags
access

public

Return values
void

addHeaderRow()

Creates a new header row in the table. Similar to {@link addRow} where the type is th

public addHeaderRow(array<string|int, mixed> $columns[, array<string|int, mixed> $classes = null ][, array<string|int, mixed> $attributes = array() ][, mixed $onClick = '' ][, string $onDblClick = '' ][, string $popupID = '' ][, string $dragID = '' ][, mixed $id = '' ][, mixed $rowAttributes = '' ]) : void
Parameters
$columns : array<string|int, mixed>

an array of html content for the table columns.

$classes : array<string|int, mixed> = null

an array of classes for the table columns, where the first classname of the array is applied to the first column in the $column array, ... . If this attribut is null, the standard classes which are defined with the parameter $classNames of the are used

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

an array of attributes for the table columns, where the first attribute of the array is applied to the first column in the $column array, ... .

$onClick : mixed = ''
$onDblClick : string = ''

the javascript code which is evaluated when double clicking on the row

$popupID : string = ''

overwrites the default PopupID when requesting a contextmenu for the row.

$dragID : string = ''

set the javascript dragevent dataTransfer data when dragging the row.

$id : mixed = ''
$rowAttributes : mixed = ''
Tags
access

public

Return values
void

addInvisibleHtml()

Sometimes it is necessary to add invisible html content when building a table, which should not be displayed in a own row, e.g. hidden input fields or script. It is possible to add those content using this method.

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

the html which should be hidden added

Tags
access

public

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 a js code snippet to the windows internal js scripts as they are used in the head or directly to the component

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

the code of the js without any <javasctipt> elements

Tags
access

public

Return values
void

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

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

the href of the js

Tags
access

public

Return values
void

addJSUtils()

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

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

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

Tags
access

public

Return values
void

addRow()

Creates a new row in the table

public addRow(array<string|int, mixed> $columns[, array<string|int, mixed> $classes = null ][, array<string|int, mixed> $attributes = array() ][, string $type = 'td' ][, mixed $onClick = '' ][, string $onDblClick = '' ][, string $popupID = '' ][, string $dragID = '' ][, string $onContextMenu = '' ][, string $id = '' ][, string $rowAttributes = '' ]) : void
Parameters
$columns : array<string|int, mixed>

an array of html content for the table columns.

$classes : array<string|int, mixed> = null

an array of classes for the table columns, where the first classname of the array is applied to the first column in the $column array, ... . If this attribut is null, the standard classes which are defined with the parameter $classNames of the are used

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

an array of attributes for the table columns, where the first attribute of the array is applied to the first column in the $column array, ... .

$type : string = 'td'

the html element type of the column (either td or th)

$onClick : mixed = ''
$onDblClick : string = ''

the javascript code which is evaluated when double clicking on the row

$popupID : string = ''

overwrites the default PopupID when requesting a contextmenu for the row.

$dragID : string = ''

set the javascript dragevent dataTransfer data when dragging the row.

$onContextMenu : string = ''

define javascript code which should be executed before the popup is shown.

$id : string = ''

of the table entry

$rowAttributes : string = ''

additional attributes which should be set to the row

Tags
access

public

Return values
void

addSeparator()

Adds a little row which can be used as separator

public addSeparator() : mixed
Tags
Return values
mixed

addTableClass()

Adds additional CSS Class(es) to the table itself.

public addTableClass(array<string|int, mixed>|string $aClasses) : void
Parameters
$aClasses : array<string|int, mixed>|string

An array of classes or an string of classes (separated by blank)

Tags
Return values
void

changeRowAtIndex()

This method allows it to manipulate an existing table row. For parameter definition see CSGuiTable::addRow method.

public changeRowAtIndex(int $iIndex, mixed $aColumns[, mixed $aClasses = null ][, mixed $aAttributes = array() ][, mixed $sType = 'td' ][, mixed $sOnClick = '' ][, mixed $sOnDblClick = '' ][, mixed $sPopupID = '' ][, mixed $sDragID = '' ][, mixed $sOnContextMenu = '' ][, mixed $sId = '' ][, mixed $sRowAttributes = '' ]) : array<string|int, mixed>
Parameters
$iIndex : int

The index of the row to change.

$aColumns : mixed
$aClasses : mixed = null
$aAttributes : mixed = array()
$sType : mixed = 'td'
$sOnClick : mixed = ''
$sOnDblClick : mixed = ''
$sPopupID : mixed = ''
$sDragID : mixed = ''
$sOnContextMenu : mixed = ''
$sId : mixed = ''
$sRowAttributes : mixed = ''
Tags
access

public

Return values
array<string|int, mixed>

The new row definition.

deactivateDragIcon()

deactivates the drag icon that is shown if a row has a drag id

public deactivateDragIcon([bool $deactivate = true ]) : void
Parameters
$deactivate : bool = true

whether to deactivate or not

Tags
Return values
void

enableJQuery()

Enables JQuery by loading all required libraries

public enableJQuery() : void
Tags
Return values
void

enableJQueryEasy()

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

public enableJQueryEasy() : void
Tags
Return values
void

enableJQueryPlugin()

Enables jQuery plugin.

public enableJQueryPlugin(string $sPluginName) : bool

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

Parameters
$sPluginName : string

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

Tags
Return values
bool

Whenever the plugin path was found or not.

enableJQueryUI()

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

public enableJQueryUI() : void
Tags
Return values
void

enablePluginCalls()

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

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

whether plugin calls may be used

Tags
Return values
mixed

getColumnCount()

Returns the maximum column count in the table

public getColumnCount() : int
Tags
Return values
int

the maximum defined columns

getController()

returns the controller of this gui component

public getController() : object
Tags
access

public

Return values
object

the controller of the gui component

getID()

Gets the id of this table

public getID() : string
Tags
Return values
string

getRowCount()

Returns the amount of rows defined within the table

public getRowCount() : int
Tags
Return values
int

the amount of defined rows

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

loadCSVData()

Loads a csv data array into the table

public loadCSVData(array<string|int, mixed> $data) : count

As common to the CONTENTSERV csv data format, the keys of the items in a row are assumed to deliver the table headers

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

the data in the CONTENTSERV csv format

Tags
access

public

Return values
count

of imported rows

loadCSVFile()

Loads a csv file into the table

public loadCSVFile(string $file[, string $delimiter = ';' ][, string $enclosure = '"' ]) : count

The first line is assumed to deliver the table headers

Parameters
$file : string

the path to the csv file

$delimiter : string = ';'

the column separator character

$enclosure : string = '"'

the column enclosing character if a value happens to contain a separator character

Tags
access

public

Return values
count

of imported rows

makeForwardUrl()

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

protected

Return values
mixed

makeHtml()

Returns the html representation of the GuiTable

public makeHtml() : string
Tags
Return values
string

code of the table

makeJavaScript()

public makeJavaScript() : mixed
Tags
access

private

Return values
mixed

makeRow()

public makeRow(mixed $columns[, mixed $classes = null ][, mixed $attributes = array() ][, mixed $type = 'td' ][, mixed $onClick = '' ][, mixed $onDblClick = '' ][, mixed $popupID = '' ][, mixed $dragID = '' ][, mixed $onContextMenu = '' ][, mixed $id = '' ][, mixed $rowAttributes = '' ]) : mixed
Parameters
$columns : mixed
$classes : mixed = null
$attributes : mixed = array()
$type : mixed = 'td'
$onClick : mixed = ''
$onDblClick : mixed = ''
$popupID : mixed = ''
$dragID : mixed = ''
$onContextMenu : mixed = ''
$id : mixed = ''
$rowAttributes : mixed = ''
Tags
Return values
mixed

makeRows()

public makeRows() : mixed
Tags
access

protected

Return values
mixed

popupAddCheckboxItem()

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

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

public

Return values
void

popupAddItem()

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

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

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

$sJavascript : string = ''

Javascript code to call with the popup item

$bIsEnabled : int = true

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

$sIconPath : string = ''

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

$sAccessKey : string = ''

Keyboard access key of the popup item

$bEvalCondition : bool = true

If the condition should be evaluated.

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

The namespace for the button like "workflow"

$sGroupIdentifier : string = ''

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

$iGroupIndex : int

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

Tags
access

public

Return values
void

popupAddJavascriptFunction()

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

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

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

Parameters
$jsName : string = 'displayComponentPopup'

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

Tags
Return values
void

popupAddSeparator()

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

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

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

$subMenu : string = ''

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

Tags
access

public

Return values
void

popupAddSubMenuDefinition()

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

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

The target sub menu label

$sIcon : string

THe icon of the sub menu.

$sGroupIdentifier : string = ''

The group identifier

$iGroupIndex : int

The index of the group.

Tags
Return values
void

popupEnableDebugMode()

public popupEnableDebugMode() : mixed
Tags
access

private

Return values
mixed

popupEvaluateCode()

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

public popupEvaluateCode(mixed $evalCode) : mixed

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

Parameters
$evalCode : mixed
Tags
access

public

Return values
mixed

popupGetJavascript()

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

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

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

$innerHtml : string = ""

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

$elementName : string = 'span'

An optional html element name which will contain the attribute

$embedAttribute : string = 'oncontextmenu'

The attribute which should contain the JavaScript code

$additionalAttributes : string = ""

Additional attributes which should be additionally added to the oncontext command

$popupUrl : string = ''

Overwrites the standard url where the popup is defined

$popupIDField : string = ''

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

$jsCode : string = ''

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

Tags
Return values
string

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

popupGetMultipleRequestID()

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

public popupGetMultipleRequestID() : bool
Tags
Return values
bool

whether a popup request for multiple items have been sent

popupGetRequestID()

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

public popupGetRequestID() : string
Tags
Return values
string

the ID for which a popup is requested

popupInsertItem()

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

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

public

Return values
void

popupMakeHtml()

Creates the final popup html code

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

protected

Return values
mixed

popupRemoveAllItems()

Completely removes all popup items from the component

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

the labels of the items which may be kept

$recursive : bool = false

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

Tags
access

public

Return values
void

popupRemoveItem()

Remove one items from the popup for the component

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

label of the popup item

$evalCondition : string|bool = true

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

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

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

Tags
access

public

Return values
void

popupRemoveItemsByNamespace()

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

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

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

Tags
Return values
void

popupSetCharset()

Sets the encoding for the popup components

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

$charset the new characterset

popupSetDefaultPopup()

Sets the default popup for the component

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

Popup object to use as popup for the component

Tags
access

protected

Return values
void

popupSetRequestID()

Overwrites the id returned by popupSetRequestID

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

the value of the id to overwrite

Tags
Return values
void

popupSetUrl()

Changes the url where the popup should be loaded from.

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

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

Parameters
$popupUrl : string = ''

the url where the popup is defined

$idField : string = 'POPUP_ID'

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

$recursive : bool = false

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

Tags
access

public

Return values
void

popupSetVisible()

Enables or disables the visiblity of the popup.

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

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

Parameters
$visibility : bool = null

whether the component has a visible popup menu

Tags
access

public

Return values
void

popupUseDefaultItem()

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

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

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

Parameters
$label : string

label of the popup item

$evalCondition : string|bool = true

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

Tags
access

public

Return values
void

removeAllRows()

Removes all rows from the table instance.

public removeAllRows() : void
Tags
access

public

Return values
void

removeEmptyColumns()

Removes all colums which are empty for all rows

public removeEmptyColumns() : void
Tags
Return values
void

removeRowAtIndex()

Removes the row at the specified index.

public removeRowAtIndex(int $iIndex) : array<string|int, mixed>
Parameters
$iIndex : int

The index of the row to remove.

Tags
access

public

Return values
array<string|int, mixed>

The definition of the removed row.

setColumnCount()

sets the column count for the table

public setColumnCount(int $columnCount) : void
Parameters
$columnCount : int

the number of columns for the table

Tags
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

setDisplayFinalRow()

Sets whether the last row in the table should fill the remaining height

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

whether the last row should have the style='height:100%'

Tags
access

public

Return values
void

setFillEmptyCells()

Sets whether to fill empty cells at the end of a row to avoid not formatted cells

public setFillEmptyCells(mixed $fill) : void
Parameters
$fill : mixed
Tags
access

public

Return values
void

setFilterable()

Sets whether the table is filterable or not

public setFilterable([int $filterable = self::FILTER_TYPE_SELECTION ][, string $jsCode = '' ]) : void
Parameters
$filterable : int = self::FILTER_TYPE_SELECTION

Sets the filter type for the table. Possible values are:

FILTER_TYPE_NONE: no filtering allowed. FILTER_TYPE_SELECTION: allows the filtering of the table via dropdown selection of values. FILTER_TYPE_TEXT: allows the filter of the table via free text input.

$jsCode : string = ''

the javascript code that should be executed after a filtering operation

Tags
access

public

Return values
void

setID()

sets the id for this table

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

the id of this table

Tags
Return values
void

setOnBeforeClick()

sets a global before onclick function that is executed every time before a row is clicked.

public setOnBeforeClick(mixed $onBeforeClick) : void

If code evaluates to === false, onClick event is not executed.

Parameters
$onBeforeClick : mixed
Tags
Return values
void

setOnClick()

sets a global onclick function that is executed every time a row is clicked

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

the js code that should be executed on click

Tags
Return values
void

setOnDrag()

sets a global on drag handler for dragging operations inside the table

public setOnDrag(string $jsCode) : void
Parameters
$jsCode : string

the js code that should be executed

Tags
Return values
void

setOnDragEnd()

sets a global on drag end handler for dragging operations inside the table

public setOnDragEnd(string $jsCode) : void
Parameters
$jsCode : string

the js code that should be executed

Tags
Return values
void

setOnDragEnter()

sets a global on drag enter handler for dragging operations inside the table

public setOnDragEnter(string $jsCode) : void
Parameters
$jsCode : string

the js code that should be executed

Tags
Return values
void

setOnDragLeave()

sets a global on drag leave handler for dragging operations inside the table

public setOnDragLeave(string $jsCode) : void
Parameters
$jsCode : string

the js code that should be executed

Tags
Return values
void

setOnDragOver()

sets a global on drag over handler for dragging operations inside the table

public setOnDragOver(string $jsCode) : void
Parameters
$jsCode : string

the js code that should be executed

Tags
Return values
void

setOnDragStart()

sets a global on drag start handler for dragging operations inside the table

public setOnDragStart(string $jsCode) : void
Parameters
$jsCode : string

the js code that should be executed

Tags
Return values
void

setOnDrop()

sets a global on drop handler for dragging operations inside the table

public setOnDrop(string $jsCode) : void
Parameters
$jsCode : string

the js code that should be executed

Tags
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

setRowClassPrefix()

Sets the classname for the rows of the table.

public setRowClassPrefix(string $rowClassPrefix) : void

The classname given is just a prefix. As it is possible to display rows in an alternating color, there is added a suffix to the classname. This suffix is either 'odd' or 'even'. If one wants to define css styles for the rows one have to define two style for [$rowClassPrefix]odd and [$rowClassPrefix]even, e.g. if you set the $rowClassPrefix to test, you can define those stylesclasses: tr.testodd, tr.testeven {...}

Parameters
$rowClassPrefix : string

the prefix for css style for rows in the table

Tags
access

public

Return values
void

setSelectable()

Sets whether a row which is clicked should be displayed as selected

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

whether clicking on rows should select them

Tags
access

public

Return values
void

setSortable()

Sets whether the table is sortable or not

public setSortable([bool $sortable = true ][, bool $manuallySortable = false ][, mixed $phpSort = false ]) : void
Parameters
$sortable : bool = true

whether the table should be sortable by clicking on the header rows

$manuallySortable : bool = false

whether the table should be manually sortable by dragging rows

$phpSort : mixed = false
Tags
access

public

Return values
void

setSortingCallback()

sets a callback function for sorted columns

public setSortingCallback(mixed $callback) : void
Parameters
$callback : mixed

the callback function to use string: this code is evaluated for every column that is filtered array: the array indexes references the column indexes so one can define different callback functions for different table columns

Tags
Return values
void

setStyle()

Sets the style for the complete table

public setStyle(string $style) : void
Parameters
$style : string

the css style for the table

Tags
access

public

Return values
void

throwError()

Throws a CSException

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

        

Search results