Bug #88017
closedstatic::class in <f:form.select>
100%
Description
When I use subclass of SelectViewHelper with <f:form.select.option>, the value will not be passed, because of the static::class
in SelectViewHelper
and SelectViewHelper::class
in OptionViewHelper
.
Something like
<foo:form.select name="select" value="2">
<f:form.select.option value="1">Option 1</f:form.select.option>
<f:form.select.option value="2">Option 2</f:form.select.option>
</foo:form.select>
So, I think it should be self::class
rather than static::class
.
Updated by Benni Mack over 5 years ago
- Status changed from New to Needs Feedback
Hi Bill,
the idea of "static::class" is that it is using the "late static binding" functionality of PHP 5.3+ - so if you subclass , you need to use SelectViewHelper::class instead. Would that work for you?
All the best,
Benni.
Updated by Bill Dagou over 5 years ago
Hi Benni,
Yes, I think it works in most cases. But the reason I created the subclass is simply overriding the errorClass, so I don't have to add errorClass="is-invalid" in all my templates.
Since all the subclasses need to use SelectViewHelper::class, do you think it's possible to change "static::class" to "self::class"?
Cheers,
Bill
Updated by Benni Mack over 5 years ago
Hi Bill,
ah, I see your point - thanks for the feedback!
Updated by Gerrit Code Review over 5 years ago
- Status changed from Needs Feedback to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60436
Updated by Gerrit Code Review over 5 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60436
Updated by Gerrit Code Review over 5 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60436
Updated by Gerrit Code Review over 5 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60452
Updated by Benni Mack over 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 65099fb8fd78c7e4eb90adaee95758da35b0a78e.