silverstripe / silverstripe/developer-docs
DOCUMENTATION for setFieldCasting
Open
Nobody has claimed this yet.
affects/v4
complexity/low
impact/low
type/docs
- Dominant language
- No language data
- Stars
- 7
- Forks
- 74
- Avg merge
- 1d 14m
- Merged PRs (30d)
- 6
Description
Affected Version
SS4+
Description
It would be great to have a bit more detail for about setFieldCasting.
In particular, it is unclear which one we should use:
'MyField' => DBDatetime::class.'->Nice', //OR
'MyField' => 'Datetime->Nice', //OR
'MyField' => 'DBDatetime->Nice'
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked src/Forms/GridField/GridFieldDataColumns.php lines 102-106 and compare the three setFieldCasting examples in the issue. Locate the corresponding setFieldCasting documentation in this developer-docs repository, clarify which syntax is supported, and document the correct form with an example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100