From: Tim Düsterhus Date: Mon, 18 Oct 2021 13:49:07 +0000 (+0200) Subject: Merge branch '5.4' into 5.5 X-Git-Tag: 5.6.final~129 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5dc461067ab58386f03e5254177868d4acd0adbe;p=GitHub%2FWoltLab%2Fwoltlab.github.io.git Merge branch '5.4' into 5.5 --- 5dc461067ab58386f03e5254177868d4acd0adbe diff --cc docs/php/api/form_builder/dependencies.md index 7816d86f,effbf0ef..f80c9af3 --- a/docs/php/api/form_builder/dependencies.md +++ b/docs/php/api/form_builder/dependencies.md @@@ -50,23 -50,13 +50,27 @@@ When the form is built, all dependencie ## Default Dependencies -WoltLab Suite Core delivers the following dependency classes by default: +WoltLab Suite Core delivers the following default dependency classes by default: -- `NonEmptyFormFieldDependency` can be used to ensure that a node is only shown if the value of the referenced form field is not empty (being empty is determined using PHP’s `empty()` language construct). -- `EmptyFormFieldDependency` is the inverse of `NonEmptyFormFieldDependency`, checking for `!empty()`. -- `ValueFormFieldDependency` can be used to ensure that a node is only shown if the value of the referenced form field is from a specified list of of values (see methods `values($values)` and `getValues()`). +### `NonEmptyFormFieldDependency` + - `NonEmptyFormFieldDependency` can be used to ensure that a node is only shown if the value of the referenced form field is not empty (being empty is determined using PHP’s `empty` function). ++`NonEmptyFormFieldDependency` can be used to ensure that a node is only shown if the value of the referenced form field is not empty (being empty is determined using PHP’s `empty()` language construct). ++ ++### `EmptyFormFieldDependency` ++ ++This is the inverse of `NonEmptyFormFieldDependency`, checking for `!empty()`. + +### `ValueFormFieldDependency` + +`ValueFormFieldDependency` can be used to ensure that a node is only shown if the value of the referenced form field is from a specified list of of values (see methods `values($values)` and `getValues()`). Additionally, via `negate($negate = true)` and `isNegated()`, the logic can also be inverted by requiring the value of the referenced form field not to be from a specified list of values. +### `ValueIntervalFormFieldDependency` + +!!! info "Only available since version 5.5." + +`ValueIntervalFormFieldDependency` can be used to ensure that a node is only shown if the value of the referenced form field is in a specific interval whose boundaries are set via `minimum(?float $minimum = null)` and `maximum(?float $maximum = null)`. + ## JavaScript Implementation