You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All form (including end-user facing as well as the backend config forms) should be created using the Drupal 8 Form API whereby all of the functions in the Ebsco module file and templates that hardcode the building of <form> tags and their contents should instead be moved to PHP classes that extend FormBase implementing FormInterface; and specific sub-elements of the form that are not traditional form fields (such as the facet links) should implement their own custom templates. Note that while there is some overlap with #16, I've tried to group the tasks together in a way that makes sense for a proper refactor.
The reason to do this is so that form functionality can be altered using standard Drupal best practices of the hook_form_alter and templates would only be used to tweak form layout. It is exceedingly rare that a template or preprocess would be used to alter a form's functionality.
Non-exhaustive list of tasks required:
replace ebsco_basic_search_form with a Form class that can be altered with a hook_form_alter()
replace ebsco_advanced_search_form with a Form class that can be altered with a hook_form_alter()
replace ebsco_side_facets with a Form class that can be altered with a hook_form_alter() and a renderable arrays using custom Twig templates for the different filter displays.
replace ebsco_sort_form with a Form class that can be altered with a hook_form_alter()
The text was updated successfully, but these errors were encountered:
All form (including end-user facing as well as the backend config forms) should be created using the Drupal 8 Form API whereby all of the functions in the Ebsco module file and templates that hardcode the building of
<form>
tags and their contents should instead be moved to PHP classes that extend FormBase implementing FormInterface; and specific sub-elements of the form that are not traditional form fields (such as the facet links) should implement their own custom templates. Note that while there is some overlap with #16, I've tried to group the tasks together in a way that makes sense for a proper refactor.The reason to do this is so that form functionality can be altered using standard Drupal best practices of the
hook_form_alter
and templates would only be used to tweak form layout. It is exceedingly rare that a template or preprocess would be used to alter a form's functionality.Non-exhaustive list of tasks required:
The text was updated successfully, but these errors were encountered: