Design #5785
closedRewrite field classes
Description
A complete rewrite and move to CBLib of field classes needs to be done to allow fields to be further improved in functionality. A base field class that handles the base needs of a field like basic validation, etc.. should be used then a class for each type. Example structure as follows.
Field/Type/TextType.php
Field/Type/ListType.php (handles both single and multi case)
Field/Type/CheckboxType.php (handles both single and multi case)
Field/Type/RadioType.php (handles both single and multi case)
Field/Field.php
If one type is inheriting from another that can easily be done with extend like we're basically doing now, but more functionality is needed with better structure. Better control of individual field elements such as a function strictly for generating the options of a list fieldtype (see Joomlas list form usage) so plugins can replace only that aspect, etc.. Each output should probably have its own function (e.g. ->display and ->edit) to allow replacing strictly edit for example. Trigger functionality throughout is also needed.