Project

General

Profile

Actions

Bug #88017

closed

static::class in <f:form.select>

Added by Bill Dagou over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2019-03-27
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.

Actions #1

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.

Actions #2

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

Actions #3

Updated by Benni Mack over 5 years ago

Hi Bill,

ah, I see your point - thanks for the feedback!

Actions #4

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

Actions #5

Updated by Bill Dagou over 5 years ago

Thank you for your considering.

Actions #6

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

Actions #7

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

Actions #8

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

Actions #9

Updated by Benni Mack over 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #10

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF