LDAP Account Manager

htmlAccountPageButton extends htmlButton
in package

Prints a button for the account pages.

Table of Contents

ALIGN_BOTTOM  = 3
align to bottom
ALIGN_CENTER  = 4
align to center
ALIGN_LEFT  = 1
align to left
ALIGN_RIGHT  = 2
align to right
ALIGN_TOP  = 0
align to top
VALIDATE_NUMERIC  = 'numeric'
validation rule to allow only numbers ([0-9]+)
VALIDATE_NUMERIC_WITH_NEGATIVE  = 'numericWithNegative'
validation rule to allow positive/negative numbers ([-]?[0-9]+)
$alignment  : mixed
alignment when inside a table
$colspan  : mixed
colspan if inside a table
$rowspan  : mixed
rowspan if inside a table
$cssClasses  : mixed
CSS classes
$isImageButton  : mixed
image button or text button
$name  : mixed
button name
$tableCellCssClasses  : mixed
table cell CSS classes
$value  : mixed
button text or image
$dataAttributes  : mixed
data attributes
$iconClass  : mixed
icon class (CSS) for buttons with icon + text
$isEnabled  : mixed
enabled or disabled
$onClick  : mixed
onclick event
$title  : mixed
title
$type  : mixed
button type (default: "submit" if no onClick and "button" with onClick)
__construct()  : mixed
Constructor
addDataAttribute()  : mixed
Adds a data attribute.
generateHTML()  : array<string|int, mixed>
Prints the HTML code for this element.
getAlignmentString()  : string
Returns the HTML attributes for the alignment.
getColspanString()  : string
Returns the HTML attribute for the colspan.
getCSSClasses()  : array<string|int, mixed>
Returns the CSS classes of this element.
getRowspanString()  : string
Returns the HTML attribute for the rowspan.
getTableCellCSSClasses()  : array<string|int, mixed>
Returns the CSS classes of the surrounding table cell for this element.
setCSSClasses()  : mixed
Adds CSS classes to this element.
setIconClass()  : mixed
Sets an additional icon for a text button.
setIsEnabled()  : mixed
Specifies if this component is enabled and accepts user modification.
setOnClick()  : mixed
Sets the onclick event code.
setTableCellCSSClasses()  : mixed
Adds CSS classes to the surrounding table cell for this element.
setTitle()  : mixed
Sets the button title (tooltip).
setType()  : mixed
Allows to override the default button type ("submit" if no onClick and "button" with onClick).
getDataAttributesAsString()  : string
Returns the data attributes as rendered string.

Constants

ALIGN_BOTTOM

align to bottom

public mixed ALIGN_BOTTOM = 3

ALIGN_CENTER

align to center

public mixed ALIGN_CENTER = 4

ALIGN_LEFT

align to left

public mixed ALIGN_LEFT = 1

ALIGN_RIGHT

align to right

public mixed ALIGN_RIGHT = 2

ALIGN_TOP

align to top

public mixed ALIGN_TOP = 0

VALIDATE_NUMERIC

validation rule to allow only numbers ([0-9]+)

public mixed VALIDATE_NUMERIC = 'numeric'

VALIDATE_NUMERIC_WITH_NEGATIVE

validation rule to allow positive/negative numbers ([-]?[0-9]+)

public mixed VALIDATE_NUMERIC_WITH_NEGATIVE = 'numericWithNegative'

Properties

$alignment

alignment when inside a table

public mixed $alignment = \null

$colspan

colspan if inside a table

public mixed $colspan = \null

$rowspan

rowspan if inside a table

public mixed $rowspan = \null

$cssClasses

CSS classes

protected mixed $cssClasses = array()

$isImageButton

image button or text button

protected mixed $isImageButton

$name

button name

protected mixed $name

$tableCellCssClasses

table cell CSS classes

protected mixed $tableCellCssClasses = array()

$value

button text or image

protected mixed $value

$dataAttributes

data attributes

private mixed $dataAttributes = array()

$iconClass

icon class (CSS) for buttons with icon + text

private mixed $iconClass = \null

$isEnabled

enabled or disabled

private mixed $isEnabled = \true

$onClick

onclick event

private mixed $onClick = \null

$title

title

private mixed $title = \null

$type

button type (default: "submit" if no onClick and "button" with onClick)

private mixed $type = \null

Methods

__construct()

Constructor

public __construct(string $targetModule, string $targetPage, string $identifier, string $value[, string $isImageButton = false ][, string $title = null ]) : mixed
Parameters
$targetModule : string

module name which renders next page

$targetPage : string

name of next page

$identifier : string

identifier for button

$value : string

button text or image (16x16px, relative to graphics folder)

$isImageButton : string = false

image or text button (default text)

$title : string = null

title to show

Return values
mixed

addDataAttribute()

Adds a data attribute.

public addDataAttribute(string $key, string $value) : mixed
Parameters
$key : string

attribute name (without "data-")

$value : string

attribute value

Return values
mixed

generateHTML()

Prints the HTML code for this element.

public abstract generateHTML(string $module, array<string|int, mixed> $input, array<string|int, mixed> $values, bool $restricted, int &$tabindex, string $scope) : array<string|int, mixed>
Parameters
$module : string

Name of account module

$input : array<string|int, mixed>

List of meta-HTML elements

$values : array<string|int, mixed>

List of values which override the defaults in $input (name => value)

$restricted : bool

If true then no buttons will be displayed

$tabindex : int

Start value of tabulator index for input fields

$scope : string

Account type

Return values
array<string|int, mixed>

List of input field names and their type (name => type)

getAlignmentString()

Returns the HTML attributes for the alignment.

public getAlignmentString() : string
Return values
string

alignment HTML attributes (e.g. align="right" valign="top")

getColspanString()

Returns the HTML attribute for the colspan.

public getColspanString() : string
Return values
string

colspan HTML attribute (e.g. colspan=3)

getCSSClasses()

Returns the CSS classes of this element.

public getCSSClasses() : array<string|int, mixed>
Return values
array<string|int, mixed>

$classes CSS class names

getRowspanString()

Returns the HTML attribute for the rowspan.

public getRowspanString() : string
Return values
string

rowspan HTML attribute (e.g. rowspan=3)

getTableCellCSSClasses()

Returns the CSS classes of the surrounding table cell for this element.

public getTableCellCSSClasses() : array<string|int, mixed>
Return values
array<string|int, mixed>

CSS classes

setCSSClasses()

Adds CSS classes to this element.

public setCSSClasses(array<string|int, mixed> $classes) : mixed
Parameters
$classes : array<string|int, mixed>

CSS class names

Return values
mixed

setIconClass()

Sets an additional icon for a text button.

public setIconClass(string $iconClass) : mixed

The icon class is a CSS class that specifies the icon image (e.g. "deleteButton" in layout.css).

Parameters
$iconClass : string

icon class

Return values
mixed

setIsEnabled()

Specifies if this component is enabled and accepts user modification.

public setIsEnabled(bool $isEnabled) : mixed
Parameters
$isEnabled : bool

enabled if true

Return values
mixed

setOnClick()

Sets the onclick event code.

public setOnClick(string $onClick) : mixed

This makes this button a simple button that does not submit a form.

Parameters
$onClick : string

JS code

Return values
mixed

setTableCellCSSClasses()

Adds CSS classes to the surrounding table cell for this element.

public setTableCellCSSClasses(array<string|int, mixed> $classes) : mixed
Parameters
$classes : array<string|int, mixed>

CSS class names

Return values
mixed

setTitle()

Sets the button title (tooltip).

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

title

Return values
mixed

setType()

Allows to override the default button type ("submit" if no onClick and "button" with onClick).

public setType(mixed $type) : mixed
Parameters
$type : mixed
Return values
mixed

getDataAttributesAsString()

Returns the data attributes as rendered string.

protected getDataAttributesAsString() : string
Return values
string

data attributes

Search results