Add field exclusion parameter to YORM getForm() #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Users need to exclude fields from YORM-generated forms (e.g., hiding name/surname in user profile edits) without creating custom model classes and overriding
getFields().Changes
rex_yform_manager_dataset::getForm(array $excludeFields = [])- Added optional parameter to exclude fields by namerex_yform_manager_collection::getForm(array $excludeFields = [])- Same exclusion capability for multi-edit formscreateForm()- Filters excluded fields during form construction usingin_array()checkUsage
Backward compatible - existing calls without parameters continue to work unchanged.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/c3fe76976081ab871aa654e872da588077e19679/usr/bin/php8.3 -n -c /tmp/ZfHDlQ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e/usr/bin/php8.3 -n -c /tmp/ZfHDlQ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/composer/semver/zipball/198166618906cb2de69b95d7d47e5fa8aa1b2b95/usr/bin/php8.3 -n -c /tmp/ZfHDlQ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef/usr/bin/php8.3 -n -c /tmp/ZfHDlQ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/e03b07a58e08133c92c9e7a5ccc69e1457f8c98d/usr/bin/php8.3 -n -c /tmp/ZfHDlQ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/redaxo/php-cs-fixer-config/zipball/5ab76b209f34d09268b9e9c8ee4f3d6b650e9ff1/usr/bin/php8.3 -n -c /tmp/ZfHDlQ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/exporter/zipball/14c6ba52f95a36c3d27c835d65efc7123c446e8c/usr/bin/php8.3 -n -c /tmp/ZfHDlQ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7/usr/bin/php8.3 -n -c /tmp/ZfHDlQ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9ecfec57835a5581bc888ea7e13b51eb55ab9dd3/usr/bin/php8.3 -n -c /tmp/ZfHDlQ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/539c6691e0623af6dc6f9c20384c120f963465a0/usr/bin/php8.3 -n -c /tmp/ZfHDlQ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e/usr/bin/php8.3 -n -c /tmp/ZfHDlQ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7/usr/bin/php8.3 -n -c /tmp/ZfHDlQ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c/usr/bin/php8.3 -n -c /tmp/ZfHDlQ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/console/zipball/13d3176cf8ad8ced24202844e9f95af11e2959fc/usr/bin/php8.3 -n -c /tmp/ZfHDlQ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62/usr/bin/php8.3 -n -c /tmp/ZfHDlQ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/options-resolver/zipball/d28e7e2db8a73e9511df892d36445f61314bbebe/usr/bin/php8.3 -n -c /tmp/ZfHDlQ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/380872130d3a5dd3ace2f4010d95125fde5d5c70/usr/bin/php8.3 -n -c /tmp/ZfHDlQ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c/usr/bin/php8.3 -n -c /tmp/ZfHDlQ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/polyfill-php80/zipball/0cc9dd0f17f61d8131e7df6b84bd344899fe2608/usr/bin/php8.3 -n -c /tmp/ZfHDlQ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c/usr/bin/php8.3 -n -c /tmp/ZfHDlQ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/process/zipball/48bad913268c8cafabbf7034b39c8bb24fbc5ab8/usr/bin/php8.3 -n -c /tmp/ZfHDlQ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/service-contracts/zipball/f021b05a130d35510bd6b25fe9053c2a8a15d5d4/usr/bin/php8.3 -n -c /tmp/ZfHDlQ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/stopwatch/zipball/b67e94e06a05d9572c2fa354483b3e13e3cb1898/usr/bin/php8.3 -n -c /tmp/ZfHDlQ /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/string/zipball/f96476035142921000338bad71e5247fbc138872/usr/bin/php8.3 -n -c /tmp/ZfHDlQ /usr/bin/composer install --no-interaction(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
This section details on the original issue you should resolve
<issue_title>Exclude für YORM</issue_title>
<issue_description>Mit YORM erstelle ich aktuell so ein Formular . Das ist soweit ok.
Allerdings fehlt die Möglichkeit bestimmte Felder zu exkluden.
Also z.B. Bei einem User-Profil, soll der Name und Vorname nicht mehr angezeigt oder bearbeitet werden können.
Oder man braucht das Formular noch mal aber mit weniger Details.
Hier wäre es gut $manager mitzuteilen dass er felder excluden soll, wenn werte gewünscht sind kann man ja dann immer noch sowas wie $yform->setValueField('hidden', array("kreis", $kreis, 'REQUEST')); setzen