isDynamic()
isDynamic() : boolean
Check if element is dynamic
Navigation 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
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.
addButton(string $label, array $meta = array()) : \ValidFormBuilder\Button
Add a button to the navigation object
string | $label | Button label |
array | $meta | The meta array |
addHtml(string $html, array $meta = array()) : \ValidFormBuilder\StaticText
Inject HTML in the navigation element
string | $html | The HTML string |
array | $meta | Optional meta array |
toHtml(boolean $submitted = false, boolean $blnSimpleLayout = false, boolean $blnLabel = true, boolean $blnDisplayError = true) : string
Render the Navigation and it's children
boolean | $submitted | Define if the element has been submitted and propagate that flag to the child fields |
boolean | $blnSimpleLayout | Only render in simple layout mode |
boolean | $blnLabel | |
boolean | $blnDisplayError | Display generated errors |
Rendered Navigation
getFields() : \ValidFormBuilder\Collection
Get the internal fields collection