Problem/Motivation
The string '_none'
is repeated throughout the module and tests, using a constant makes it easier to refactor.
Steps to reproduce
NA
Proposed resolution
- Convert
_none
to a constant. - Move
form_select_options()
to a helper class. - Move
form_get_options()
to a helper class.
Remaining tasks
Review
User interface changes
API changes
String '_none'
is converted to constant.form_select_options()
and form_get_options()
are moved as class methods in \Drupal\Core\Form\FormOptionsHelper
Data model changes
NA
Release notes snippet
NA