isDynamic()
isDynamic() : boolean
Check if this is a dynamic element
Returns
boolean —Always false; buttons can't be dynamic
Button Class
This generates a <button> element. You can customize this button using the meta array. For example, you can add a custom class property to the button like this:
$objForm->addButton(
"Button label",
array(
// Set for example a Twitter Bootstrap class on this button
"fieldclass" => "btn btn-large"
)
);
addCondition(string $strType, boolean $blnValue, array $arrComparisons, string $intComparisonType = \ValidFormBuilder\ValidForm::VFORM_MATCH_ANY)
Add a new condition to the current field
For examples, check \ValidFormBuilder\Condition
string | $strType | Define the condition type. This can be either |
boolean | $blnValue | Define whether this condition activates if the comparison(s) are true or false. |
array | $arrComparisons | An array of Comparison objects |
string | $intComparisonType | The comparison type.
Either |
if Condition could not be set
If invalid arguments are supplied
getCondition(string $strProperty) : \ValidFormBuilder\Condition|null
Get element's Condition object
Note: When chaining methods, always use hasCondition() first before chaining
for example getCondition()->isMet()
.
string | $strProperty | Condition type e.g. 'required', 'visibile' and 'enabled' |
Found condition or null if no condition is found.
getMetCondition(string $strProperty) : null|\ValidFormBuilder\Condition
Only get a condition of a given type if that condition is met. If the condition is not met, this returns null
string | $strProperty | Condition type e.g. 'required', 'visibile' and 'enabled' |
getConditionRecursive(string $strProperty, \ValidFormBuilder\Element $objContext = null) : \ValidFormBuilder\Condition|null
This gets the condition of a given property, just like {@link \ValidFormBuilder\Base::getCondition()}.
When no condition is found on the current element, the method searches for a condition in it's parent element.
string | $strProperty | Condition type e.g. |
\ValidFormBuilder\Element | $objContext |
setFieldMeta(string $property, mixed $value, boolean $blnOverwrite = false) : mixed
Set field specific meta data
string | $property | Property name. |
mixed | $value | Property value. |
boolean | $blnOverwrite | Optionally use this boolean to force an overwrite of previous property value. |
The newly set value
setLabelMeta(string $property, mixed $value, boolean $blnOverwrite = false) : mixed
Set label specific meta data
string | $property | Property name. |
mixed | $value | Property value. |
boolean | $blnOverwrite | Optionally use this boolean to force an overwrite of previous property value. |
The newly set value
setTipMeta(string $property, mixed $value, boolean $blnOverwrite = false) : mixed
Set tip specific meta data
string | $property | Property name. |
mixed | $value | Property value. |
boolean | $blnOverwrite | Optionally use this boolean to force an overwrite of previous property value. |
The newly set value
setDynamicLabelMeta(string $property, mixed $value, boolean $blnOverwrite = false) : mixed
Set dynamic label specific meta data
string | $property | Property name. |
mixed | $value | Property value. |
boolean | $blnOverwrite | Optionally use this boolean to force an overwrite of previous property value. |
The newly set value
setDynamicRemoveLabelMeta(string $property, mixed $value, boolean $blnOverwrite = false) : mixed
Set dynamic remove label specific meta data
string | $property | Property name. |
mixed | $value | Property value. |
boolean | $blnOverwrite | Optionally use this boolean to force an overwrite of previous property value. |
The newly set value
getLabelMeta(string $property = null, string $fallbackValue = "") : string
Get label meta property.
string | $property | Property to get from internal label meta array. |
string | $fallbackValue | Optional fallback value if requested property has no value |
Property value or empty string of none is set.
getDynamicName(integer $intCount) : string
Same as getName() except getDynamicName adds the current dynamic count to the fieldname as a suffix (_1, _2 etc)
When the dynamic count === 0, the return value equals the output of getName()
integer | $intCount | The dynamic count |
The field name
setData(string $strKey = null, mixed $varValue = null) : boolean
Store data in the current object.
This data will not be visibile in any output and will only be used for internal purposes. For example, you can store some custom data from your CMS or an other library in a field object, for later use.
Note: Using this method will overwrite any previously set data with the same key!
string | $strKey | The key for this storage |
mixed | $varValue | The value to store |
True if set successful, false if not.
toHtml(boolean $submitted = false, boolean $blnSimpleLayout = false, boolean $blnLabel = true, boolean $blnDisplayErrors = true) : string
Generate the HTML output for this button
boolean | $submitted | Obsolete property only used to keep method fingerprint compatible |
boolean | $blnSimpleLayout | Obsolete property only used to keep method fingerprint compatible |
boolean | $blnLabel | Obsolete property only used to keep method fingerprint compatible |
boolean | $blnDisplayErrors | Obsolete property only used to keep method fingerprint compatible |
Generated HTML output