From 07e454de9d19b7a76b400935638ba7ba1b7228fc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 18 Oct 2021 15:47:51 +0200 Subject: [PATCH] Dcoument `EmptyFormFieldDependency` Resolves #235 --- docs/php/api/form_builder/dependencies.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/php/api/form_builder/dependencies.md b/docs/php/api/form_builder/dependencies.md index a7563725..effbf0ef 100644 --- a/docs/php/api/form_builder/dependencies.md +++ b/docs/php/api/form_builder/dependencies.md @@ -50,9 +50,10 @@ When the form is built, all dependencies that only know the id of the relevant f ## Default Dependencies -WoltLab Suite Core delivers the following two default dependency classes by default: +WoltLab Suite Core delivers the following 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` 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` 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()`). 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. -- 2.20.1