LDAP Account Manager

htmlResponsiveRow extends htmlElement
in package

Responsive row with 12 column layout.

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
$tableCellCssClasses  : array<string|int, mixed>|null
$accessibilityLabel  : string|null
accessibility label
$cells  : array<string|int, mixed>
$dataAttributes  : array<string|int, mixed>
$id  : string|null
HTML ID
$onClick  : string|null
__construct()  : mixed
Creates a new responsive row.
add()  : void
Adds a cell with the given content and column counts.
addAtTheBeginning()  : void
Adds a cell at the beginning with the given content and column counts.
addCell()  : void
Adds a responsive cell at the end of the row.
addCellAtTheBeginning()  : void
Adds a responsive cell at the beginning of the row.
addDataAttribute()  : void
Adds a data attribute.
addField()  : void
Adds the content as a typical field with 12/6/6 columns and CSS class "responsiveField".
addLabel()  : void
Adds the content as a typical label with 12/6/6 columns and CSS class "responsiveLabel".
addVerticalSpacer()  : void
Adds a vertical spacer with 12 columns.
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.
getCellCount()  : int
Returns the current number of cells.
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.
setId()  : void
Sets the HTML id.
setOnClick()  : void
setTableCellCSSClasses()  : void
Adds CSS classes to the surrounding table cell for this element.
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

$tableCellCssClasses

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

table cell CSS classes

$accessibilityLabel

accessibility label

private string|null $accessibilityLabel = \null

$cells

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

cells

$dataAttributes

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

data attributes

$id

HTML ID

private string|null $id = \null

$onClick

private string|null $onClick = \null

Methods

__construct()

Creates a new responsive row.

public __construct([htmlElement $label = null ][, htmlElement $field = null ]) : mixed
Parameters
$label : htmlElement = null

label element if this is a simple label+field row

$field : htmlElement = null

field element if this is a simple label+field row

Return values
mixed

add()

Adds a cell with the given content and column counts.

public add(htmlElement $content[, int $numMobile = 12 ][, int|null $numTablet = null ][, int|null $numDesktop = null ][, string $classes = '' ]) : void
Parameters
$content : htmlElement

content inside cell

$numMobile : int = 12

number of columns for mobile view

$numTablet : int|null = null

number of columns for tablet view (set to mobile if null)

$numDesktop : int|null = null

number of columns for desktop view (set to tablet if null)

$classes : string = ''

CSS classes separated by space

Return values
void

addAtTheBeginning()

Adds a cell at the beginning with the given content and column counts.

public addAtTheBeginning(htmlElement $content[, int $numMobile = 12 ][, int|null $numTablet = null ][, int|null $numDesktop = null ][, string $classes = '' ]) : void
Parameters
$content : htmlElement

content inside cell

$numMobile : int = 12

number of columns for mobile view

$numTablet : int|null = null

number of columns for tablet view (set to mobile if null)

$numDesktop : int|null = null

number of columns for desktop view (set to tablet if null)

$classes : string = ''

CSS classes separated by space

Return values
void

addCellAtTheBeginning()

Adds a responsive cell at the beginning of the row.

public addCellAtTheBeginning(htmlResponsiveCell $cell) : void
Parameters
$cell : htmlResponsiveCell

cell

Return values
void

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

addField()

Adds the content as a typical field with 12/6/6 columns and CSS class "responsiveField".

public addField(htmlElement $content[, string $cssClasses = '' ]) : void
Parameters
$content : htmlElement

field

$cssClasses : string = ''

CSS class names separated by space

Return values
void

addLabel()

Adds the content as a typical label with 12/6/6 columns and CSS class "responsiveLabel".

public addLabel(htmlElement $content[, string $cssClasses = '' ]) : void
Parameters
$content : htmlElement

label

$cssClasses : string = ''

additional CSS classes

Return values
void

addVerticalSpacer()

Adds a vertical spacer with 12 columns.

public addVerticalSpacer(string $space) : void
Parameters
$space : string

space in px or rem

Return values
void

generateHTML()

Prints the HTML code for this element.

public generateHTML(mixed $module, mixed $input, mixed $values, mixed $restricted) : array<string, string>
Parameters
$module : mixed

Name of account module

$input : mixed

List of meta-HTML elements

$values : mixed

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

$restricted : mixed

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

getCellCount()

Returns the current number of cells.

public getCellCount() : int
Return values
int

cell count

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

setId()

Sets the HTML id.

public setId(string|null $id) : void
Parameters
$id : string|null

ID

Return values
void

setOnClick()

public setOnClick(string $code) : void
Parameters
$code : string
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

getDataAttributesAsString()

Returns the data attributes as rendered string.

protected getDataAttributesAsString() : string
Return values
string

data attributes

Search results