Review main Merged

72803[FEATURE] Add content object related arguments to HtmlViewHelper

Stefan Froemken CR +2 V +2 Hard +265 −7 updated 01/06/22, 14:52

Commit message

The HtmlViewHelper is extended for a couple of new arguments,
used to influence the initialization of the content object.

Following arguments are added:

- "data" (array or object)
- "current"
- "currentValueKey"
- "table"

This allows to properly work with dynamic data in a custom parseFunc.

With the provided data record ("data" argument), the individual
entries can now be accessed using TS:field. With the "current"
argument, TS:current can be filled individually and with the
"currentValueKey" argument, a specific value from the data
record can be set as new TS:current.

The "table" argument is added for completeness, so that the
ContentObjectRenderer can be initialized correctly.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 1927

Show 2 earlier messages
  1. Stefan Froemken uploaded patch set 1 12/23/21, 22:46

  2. Stefan Froemken uploaded patch set 2 12/23/21, 23:03

  1. core-ci voted on patch set 2 V -1 12/23/21, 23:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21447

  2. Stefan Froemken uploaded patch set 3 12/23/21, 23:26

  3. core-ci voted on patch set 3 V -1 12/23/21, 23:29 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21448

  4. Stefan Froemken uploaded patch set 4 12/24/21, 00:34

  5. core-ci voted on patch set 4 V +1 12/24/21, 00:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21449

  6. Benni Mack commented on patch set 4 12/24/21, 11:50

    Feature-92749-AddDataAttributeToHtmlViewHelper.rst:35

    haha, this syntax is pre TYPO3 v8 :) I thought all migration wizards would have caught this now...
  7. Stefan Froemken commented on patch set 4 12/24/21, 12:51

    Feature-92749-AddDataAttributeToHtmlViewHelper.rst:35 Reply

    I only have taken it from current main branch of TYPO3 11 :-) Seems to be a top modern solution to do so :D https://github.com/TYPO3/typo3/blob/main/typo3/sysext/fluid/Classes/ViewHelpers/Format/HtmlViewHelper.php#L42
  8. Stefan Froemken uploaded patch set 5 12/24/21, 13:17

  9. Stefan Froemken commented on patch set 5 12/24/21, 13:17

    I have updated the examples a little bit to be more modern and "cool". Hope it's OK.
  10. core-ci voted on patch set 5 V +1 12/24/21, 13:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21455

  11. Oli Bartsch commented on patch set 5 01/03/22, 15:11

    To me this is a bit misleading. There is no HTML "data" attribute added, but a new VH argument, called "data". Additionally, the "data" argument is not the only new argument. Could we please update this accordingly (also in the Feature.rst)?
  12. Stefan Froemken updated the commit message in patch set 6 01/05/22, 21:45

  13. core-ci voted on patch set 6 V +1 01/05/22, 22:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21668

  14. Oli Bartsch commented on patch set 6 01/06/22, 13:19

    HtmlViewHelper.php:69

    With the current implementation, this only works in case this is already an array. Usually such records can also be objects (e.g. defined via domain models and fetched by an extbase repository).
  15. Oli Bartsch uploaded patch set 7 01/06/22, 13:28

  16. Oli Bartsch updated the commit message in patch set 8 01/06/22, 13:30

  17. Oli Bartsch commented on patch set 8 V +1 CR +1 01/06/22, 13:31

    Reply

    Done

    HtmlViewHelper.php:69 Reply

    Done
  18. core-ci voted on patch set 7 V +1 01/06/22, 13:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21694

  19. core-ci voted on patch set 8 V +1 01/06/22, 13:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21695

  20. Benni Mack commented on patch set 9 01/06/22, 14:27

    Published edit on patch set 8.
  21. Benni Mack voted on patch set 9 V +1 CR +1 01/06/22, 14:28

  22. Oli Bartsch voted on patch set 9 V +1 CR +1 01/06/22, 14:29

  23. core-ci voted on patch set 9 V +1 01/06/22, 14:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21705

  24. Benni Mack commented on patch set 9 V +2 CR +2 01/06/22, 14:52

    Thanks, Stefan for providing the patch!
  25. Benni Mack merged patch set 10 01/06/22, 14:52