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
$alignment  : int|null
alignment when inside a table
$colspan  : int|null
colspan if inside a table
$rowspan  : int|null
rowspan if inside a table
$cssClasses  : array<string|int, mixed>|null
$isImageButton  : bool
image button or text button
$name  : string
button name
$tableCellCssClasses  : array<string|int, mixed>|null
$value  : string
button text or image
$accessibilityLabel  : string|null
accessibility label
$dataAttributes  : array<string|int, mixed>
$isEnabled  : bool
enabled or disabled
$noFormValidation  : bool
disable form validation
$onClick  : string|null
onclick event
$title  : string|null
title
$type  : string|null
button type (default: "submit" if no onClick and "button" with onClick)
__construct()  : mixed
Constructor
addDataAttribute()  : void
Adds a data attribute.
disableFormValidation()  : void
Disables form validation (e.g. for cancel buttons).
generateHTML()  : array<string, string>
Prints the HTML code for this element.
getAccessibilityMarkup()  : string
Returns the markup for the accessibility data.
getAlignmentString()  : string
Returns the HTML attributes for the alignment.
getColspanString()  : string
Returns the HTML attribute for the colspan.
getCSSClasses()  : array<string|int, string>|null
Returns the CSS classes of this element.
getRowspanString()  : string
Returns the HTML attribute for the rowspan.
getTableCellCSSClasses()  : array<string|int, string>|null
Returns the CSS classes of the surrounding table cell for this element.
setAccessibilityLabel()  : void
Sets the accessibility label.
setCSSClasses()  : void
Adds CSS classes to this element.
setIsEnabled()  : void
Specifies if this component is enabled and accepts user modification.
setOnClick()  : void
Sets the onclick event code.
setTableCellCSSClasses()  : void
Adds CSS classes to the surrounding table cell for this element.
setTitle()  : void
Sets the button title (tooltip).
setType()  : void
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

Properties

$alignment

alignment when inside a table

public int|null $alignment = \null

$colspan

colspan if inside a table

public int|null $colspan = \null

$rowspan

rowspan if inside a table

public int|null $rowspan = \null

$cssClasses

protected array<string|int, mixed>|null $cssClasses = []

CSS classes

$isImageButton

image button or text button

protected bool $isImageButton

$name

button name

protected string $name

$tableCellCssClasses

protected array<string|int, mixed>|null $tableCellCssClasses = []

table cell CSS classes

$value

button text or image

protected string $value

$accessibilityLabel

accessibility label

private string|null $accessibilityLabel = \null

$dataAttributes

private array<string|int, mixed> $dataAttributes = []

data attributes

$isEnabled

enabled or disabled

private bool $isEnabled = \true

$noFormValidation

disable form validation

private bool $noFormValidation = \false

$onClick

onclick event

private string|null $onClick = \null

$title

title

private string|null $title = \null

$type

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

private string|null $type = \null

Methods

__construct()

Constructor

public __construct(string $targetModule, string $targetPage, string $identifier, string $value[, bool $isImageButton = false ][, string|null $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 : bool = false

image or text button (default text)

$title : string|null = null

title to show

Return values
mixed

addDataAttribute()

Adds a data attribute.

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

attribute name (without "data-")

$value : string

attribute value

Return values
void

disableFormValidation()

Disables form validation (e.g. for cancel buttons).

public disableFormValidation() : void
Return values
void

generateHTML()

Prints the HTML code for this element.

public abstract generateHTML(string|null $module, array<string|int, htmlElement$input, array<string, array<string|int, string>> $values, bool $restricted) : array<string, string>
Parameters
$module : string|null

Name of account module

$input : array<string|int, htmlElement>

List of meta-HTML elements

$values : array<string, array<string|int, string>>

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

$restricted : bool

If true then no buttons will be displayed

Return values
array<string, string>

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

getAccessibilityMarkup()

Returns the markup for the accessibility data.

public getAccessibilityMarkup() : string
Return values
string

markup to be included in HTML tag (starting with space)

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, string>|null
Return values
array<string|int, string>|null

$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, string>|null
Return values
array<string|int, string>|null

CSS classes

setAccessibilityLabel()

Sets the accessibility label.

public setAccessibilityLabel(string|null $accessibilityLabel) : void
Parameters
$accessibilityLabel : string|null

label

Return values
void

setCSSClasses()

Adds CSS classes to this element.

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

CSS class names

Return values
void

setIsEnabled()

Specifies if this component is enabled and accepts user modification.

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

enabled if true

Return values
void

setOnClick()

Sets the onclick event code.

public setOnClick(string $onClick) : void

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

Parameters
$onClick : string

JS code

Return values
void

setTableCellCSSClasses()

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

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

CSS class names

Return values
void

setTitle()

Sets the button title (tooltip).

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

title

Return values
void

setType()

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

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

type (e.g. button)

Return values
void

getDataAttributesAsString()

Returns the data attributes as rendered string.

protected getDataAttributesAsString() : string
Return values
string

data attributes

Search results