Abstract base class for form elements
Methods | ||||
---|---|---|---|---|
public
|
__construct()
constructor
constructor Overriden by
|
# | ||
public
|
isContainer(): bool
Is this element a container of other elements?
Is this element a container of other elements? Returnsfalse Overriden by |
# | ||
public
|
setName(string $name)
set the "name" attribute for the element
set the "name" attribute for the element Parameters
|
# | ||
public
|
getName(bool $encode = true): string
get the "name" attribute for the element
get the "name" attribute for the element Returns"name" attribute |
# | ||
public
|
setAccessKey(string $key)
set the "accesskey" attribute for the element
set the "accesskey" attribute for the element Parameters
|
# | ||
public
|
getAccessKey(): string
get the "accesskey" attribute for the element
get the "accesskey" attribute for the element Returns"accesskey" attribute value |
# | ||
public
|
getAccessString(string $str): string
If the accesskey is found in the specified string, underlines it
If the accesskey is found in the specified string, underlines it Parameters
ReturnsEnhanced string with the 1st occurence of accesskey underlined |
# | ||
public
|
setClass(string $class)
set the "class" attribute for the element
set the "class" attribute for the element |
# | ||
public
|
getClass(): string|false
get the "class" attribute for the element
get the "class" attribute for the element Returns"class" attribute value |
# | ||
public
|
setCaption(string $caption)
set the caption for the element
set the caption for the element |
# | ||
public
|
getCaption(bool $encode = false): string
get the caption for the element
get the caption for the element Parameters
|
# | ||
public
|
getTitle(bool $encode = true): string
get the caption for the element
get the caption for the element Parameters
|
# | ||
public
|
setDescription(string $description)
set the element's description
set the element's description |
# | ||
public
|
getDescription(bool $encode = false): string
get the element's description
get the element's description Parameters
|
# | ||
public
|
setHidden()
flag the element as "hidden"
flag the element as "hidden" |
# | ||
public
|
isHidden(): bool
Find out if an element is "hidden".
Find out if an element is "hidden". |
# | ||
public
|
isRequired(): bool
Find out if an element is required.
|
# | ||
public
|
setExtra(string $extra, bool $replace = false): array
Add extra attributes to the element.
Add extra attributes to the element. This string will be inserted verbatim and unvalidated in the element's tag. Know what you are doing! Parameters
ReturnsNew content of the extra string |
# | ||
public
|
getExtra(bool $encode = false): string
Get the extra attributes for the element
Get the extra attributes for the element Parameters
|
# | ||
public
|
setNocolspan(bool $nocolspan = true)
Set the element's nocolspan
Modified by Catzwolf
Set the element's nocolspan Modified by Catzwolf DeprecatedPLEASE AVOID USING THIS METHOD |
# | ||
public
|
getNocolspan(): string|bool
Get the element's nocolspan
Modified by Catzwolf
Get the element's nocolspan Modified by Catzwolf DeprecatedPLEASE AVOID USING THIS METHOD |
# | ||
public
|
getFormType(): string
get the element's nocolspan
Modified by Catzwolf
get the element's nocolspan Modified by Catzwolf DeprecatedPLEASE AVOID USING THIS METHOD |
# | ||
public
|
setFormType(string $value = '')
set the element's nocolspan
Modified by Catzwolf
set the element's nocolspan Modified by Catzwolf DeprecatedPLEASE AVOID USING THIS METHOD |
# | ||
public
|
renderValidationJS()
Render custom javascript validation code
Render custom javascript validation code Overriden by
|
# | ||
public
|
render()
Generates output for the element.
Generates output for the element. This method is abstract and must be overwritten by the child classes. Overriden by
|
# |
Properties | |||
---|---|---|---|
public
|
array
|
$customValidationCode = []
()
() |
# |
public
|
string
|
$_name
|
# |
public
|
string
|
$_caption
|
# |
public
|
string
|
$_accesskey = ''
|
# |
public
|
array
|
$_class = []
|
# |
public
|
bool
|
$_hidden = false
|
# |
public
|
array
|
$_extra = []
|
# |
public
|
bool
|
$_required = false
|
# |
public
|
string
|
$_description = ''
|
# |
public
|
bool
|
$_nocolspan = false
|
# |
public
|
|
$_formtype = ''
Get form type
Get form type |
# |