YORM: setExcludeFields() und getExcludedFields() #1585
Open
skerbis wants to merge 8 commits intoyakamara:masterfrom
Open
YORM: setExcludeFields() und getExcludedFields() #1585skerbis wants to merge 8 commits intoyakamara:masterfrom
setExcludeFields() und getExcludedFields() #1585skerbis wants to merge 8 commits intoyakamara:masterfrom
Conversation
Co-authored-by: skerbis <791247+skerbis@users.noreply.github.com>
Co-authored-by: skerbis <791247+skerbis@users.noreply.github.com>
Co-authored-by: skerbis <791247+skerbis@users.noreply.github.com>
Co-authored-by: skerbis <791247+skerbis@users.noreply.github.com>
Add field exclusion for YORM-generated forms
There was a problem hiding this comment.
Pull Request Overview
This PR adds functionality to exclude specific fields from generated YForm forms in the YORM (YForm ORM) system. This is useful for scenarios where certain fields should not be displayed or editable in a form, such as user profile fields that should remain static or auto-managed fields.
Key changes:
- Added
setExcludeFields()andgetExcludedFields()methods torex_yform_manager_datasetclass - Modified
createForm()to skip excluded fields when building the form - Added comprehensive test coverage for the field exclusion functionality
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| lib/manager/dataset.php | Implements field exclusion functionality with private property, getter/setter methods, and form creation logic |
| tests/rex_yform_yorm_test.php | Adds test cases to verify excluded fields are stored correctly and not present in generated forms |
| docs/04_yorm.md | Documents the new feature with usage examples in German |
| CHANGELOG.md | Records the new feature in version 5.0.2 changelog entry |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This test class provides unit tests for the YForm manager's table and dataset functionalities, including setup, creation, updating, and deletion of tables and datasets.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Dieser Pull Request ergänzt *YORM um die Möglichkeit, bestimmte Felder von automatisch generierten Formularen auszuschließen.
So muss nicht immer eine Model-Class erstellt oder ein EP bemüht werden, möchte man adhoc mal ein Feld ausblenden.
setExcludeFields()undgetExcludedFields()inrex_yform_manager_datasetlib/manager/dataset.phptests/rex_yform_yorm_test.phpdocs/04_yorm.mdCHANGELOG.md