-
Notifications
You must be signed in to change notification settings - Fork 24
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
ENH Scaffold TaxonomyTerm with searchable dropdown #119
ENH Scaffold TaxonomyTerm with searchable dropdown #119
Conversation
@@ -63,33 +69,33 @@ class TaxonomyTerm extends DataObject implements PermissionProvider | |||
|
|||
public function getCMSFields() | |||
{ | |||
$fields = parent::getCMSFields(); | |||
$this->beforeUpdateCMSFields(function (FieldList $fields) { |
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.
Wrapping the implementation in beforeUpdateCMSFields()
is best practice. This is partially unrelated refactoring, but it also is necessary to make sure the Children
field is a gridfield before extension hooks fire, which will keep those functioning the same before and after this change.
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.
All other changes to this method (unless otherwise stated) are just explicitly using a GridField
for the Children
relation, instead of the auto-scaffolded searchable dropdown.
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.
I mistakently compared in to CMS 5 instead of CMS 6
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.
Tested locally, works well
Issue