New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Formfield layouts #22645
Merged
Merged
Formfield layouts #22645
Conversation
This file contains 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
mbabker
approved these changes
Oct 16, 2018
wilsonge
approved these changes
Oct 18, 2018
I have tested this item ✅ successfully on 683cd61 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22645. |
I have tested this item ✅ successfully on 4b6c9fc This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22645. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22645. |
thx |
thank you 😄 |
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.
Summary of Changes
This is a resubmission of #13018 because I totally abandoned @Spudley which is the worst I could do with a new contributor :( I'm really sorry mate and I hope you get your contribution merged at least 2 years later. I created a custom email rule for the repo notifications and everything is messed there.
This pull request adds the default layout paths to
FormField::getLayoutPaths()
so developers can inherit them and add any custom layout path required by their extensions.Before this patch a developer wanting to set custom layout paths had to do something like:
After this patch it should be easier like:
which should be better because:
FileLayout
This also adds unit tests for
FormField::getLayoutPaths()
.Testing Instructions
Edit any form containing fields (for instance com_content article) and ensure that form fields are shown correctly.
If you want ot test layout paths customisation you can create a field like it's done in the tests:
https://github.com/phproberto/joomla-cms/blob/formfield-layouts/tests/unit/suites/libraries/joomla/form/_testfields/customlayouts.php