Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #6168 Add ability to clone fields (psihius)
This PR was merged into the 4.x branch. Discussion ---------- Add ability to clone fields `FieldDto` class already has a fully implemented `__clone` method, so this seems like an obvious addition that makes certain things just better :) Allows to do stuff like this ``` $regularCheckInField = TimeField::new('fieldName') ->setLabel(t('Field Label')) ->setRequired(true) ->setFormat('HH:mm'); return [ ..., (clone $regularCheckInField)->onlyOnIndex(), $regularCheckInField ->onlyOnForms() ->setCssClass('col-md-10 col-xxl-10') ->setColumns(2), ..., ]; ``` Commits ------- b212d8b Add ability to clone fields
- Loading branch information