-
Notifications
You must be signed in to change notification settings - Fork 824
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
NEW Make CMSFields scaffolding configurable, plus new options #11328
NEW Make CMSFields scaffolding configurable, plus new options #11328
Conversation
if ($currentPointer === null) { | ||
return null; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't strictly needed, but it makes the test easier.
It seemed silly to be throwing an exception when $currentPointer
is null, because in this scenario the tab doesn't exist so we can just return null
from the method.
* @var boolean $includeRelations Include has_one, has_many and many_many relations | ||
* @var boolean $includeRelations Include has_many and many_many relations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was intentionally changed to not include has_one in 524d7a9
/** | ||
* @var boolean $ajaxSafe | ||
* @deprecated 5.3.0 Will be removed without equivalent functionality. | ||
*/ | ||
public $ajaxSafe = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't actually used at all
6c64bf0
to
c1a180b
Compare
Added |
c1a180b
to
3a63d18
Compare
Note that includeRelations was intentionally changed to not include has_one in 524d7a9
3a63d18
to
2de54c8
Compare
Doing this to support the CMS 6 changes - but there's no reason for this new feature to wait until April since it's not BC breaking.
FormScaffolder
:tabsOnly
: Only return theRoot.Main
tab in the FieldList (effectively don't scaffold anything).parent::getCMSFields()
) even in scenarios where you want to build all your form fields from scratch.ignoreFields
: Array of field names in $db or relations in $has_one which should not be scaffolded.ignoreRelations
: Array of relations in $has_many or $many_many which should not be scaffolded.restrictRelations
: Array of relation names to use as an allow list. Similar to the existingrestrictFields
getCMSFields()
configurable.Note
ignoreFields
includes $has_one to match the behaviour of bothrestrictFields
(includes $has_one) andincludeRelations
(for $has_many and $many_many only)Issue