isDynamic()
isDynamic() : boolean
Check if page is dynamic
Page Class
All ValidForm classes share this base class' logic.
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
toJS(integer $intDynamicPosition) : string
Generate javascript
See \ValidFormBuilder\Base::toJS()
integer | $intDynamicPosition | Dynamic position |
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( $submitted = false, $blnSimpleLayout = false, $blnLabel = true, $blnDisplayError = true) : string
Generate HTML
See \ValidFormBuilder\ValidForm::toHtml()
$submitted | ||
$blnSimpleLayout | ||
$blnLabel | ||
$blnDisplayError |
addField(\ValidFormBuilder\Element $objField)
Add a field object
See \ValidFormBuilder\Fieldset::addField()
\ValidFormBuilder\Element | $objField |
getFields() : \ValidFormBuilder\Collection
Return the internal elements collection