Review main Merged

55838[FEATURE] Add more arguments to the ModuleLinkViewHelper

Georg Ringer CR +2 V +2 Easy +44 −1 updated 05/12/18, 09:23

Commit message

Improve the ModuleLinkViewHelper by providing arguments as string
and the possibility to add a returnUrl.

Review

  • Code review CR +2
    • Susi Moog +2
    • Mathias Schreiber +1
  • Verified V +2
    • Susi Moog +2
    • Mathias Schreiber +1
    • TYPO3com +1 CI

Issues 1

Files 2

Review log 2732

Show 57 earlier messages
  1. Georg Ringer uploaded patch set 1 02/20/18, 18:29

  2. Christian Kuhn commented on patch set 1 CR -1 02/20/18, 18:32

    please coordinate with anja / susi on this - afaik, anja is actively working on a revamped set of BE linking VH's to also suppress duplicates and have a broader feature set.
  3. TYPO3com voted on patch set 1 V +1 02/20/18, 18:39 Completed build in 09m 48s on Tue, 20 Feb, 07:39 PM Test Summary: 30902 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-19945

  4. Anja Leichsenring updated the commit message in patch set 2 02/26/18, 19:48

  5. Anja Leichsenring commented on patch set 2 CR +1 02/26/18, 19:50

    any usages inside the core that can be replaced already?
  6. TYPO3com voted on patch set 2 V +1 02/26/18, 19:57 Completed build in 08m 41s on Mon, 26 Feb, 08:57 PM Test Summary: 30881 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-20173

  7. Mathias Schreiber commented on patch set 2 02/26/18, 19:58

    ModuleLinkViewHelper.php:39 Unresolved

    shouldn't this be bool?
  1. Markus Klein commented on patch set 3 02/26/18, 20:49

    Published edit on patch set 2.
  2. TYPO3com voted on patch set 3 V +1 02/26/18, 20:57 Completed build in 08m 07s on Mon, 26 Feb, 09:57 PM Test Summary: 30881 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-20179

  3. Anja Leichsenring voted on patch set 3 V +1 CR +1 03/01/18, 21:22

  4. Claus Due commented on patch set 3 CR -1 03/01/18, 22:28

    ModuleLinkViewHelper.php:38

    I would drop the default value here and do a check below if $arguments['query'] !== null and so on.

    ModuleLinkViewHelper.php:39

    Hmm, a better name for this might be "currentUrlParameterName".

    ModuleLinkViewHelper.php:55

    This could be unsafe; I'm not sure this works recursively. Consider using ArrayUtility!
  5. Georg Ringer uploaded patch set 4 03/16/18, 07:54

  6. TYPO3com voted on patch set 4 V +1 03/16/18, 08:03 Completed build in 08m 59s on Fri, 16 Mar, 09:03 AM Test Summary: 30879 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-21172

  7. Christian Kuhn commented on patch set 4 03/16/18, 14:14

    What is the result of the coordination with anja/susi on the BE VH's?
  8. Tobi Kretschmann voted on patch set 4 CR +1 03/26/18, 09:32

  9. Tymoteusz Motylewski commented on patch set 4 03/26/18, 10:07

    Feature-83983-ImprovedModuleLinkViewHelper.rst:15

    what wording/name do we use in other places in the core? additionalParams?

    Feature-83983-ImprovedModuleLinkViewHelper.rst:16

    Can you please be more verbose on it? From just reading description I don't get what does it do.
  10. Steffen Frese voted on patch set 4 CR +1 03/27/18, 11:35

  11. Susi Moog commented on patch set 4 03/28/18, 14:48

    > What is the result of the coordination with anja/susi on the BE > VH's? This as base / generic view helper is fine with me - when replacing viewhelpers in future patches however we should still introduce "common" use cases as their own (inherited?) view helpers [for example: edit record]
  12. Frank Nägler commented on patch set 4 04/03/18, 12:05

    ModuleLinkViewHelper.php:39

    Why we need a second argument for "arguments", imho this mess up the ViewHelper with nearly no benefit.

    ModuleLinkViewHelper.php:59

    Is it secure to to use REQUEST_URI ? IIRC there are possible attack vectors, but maybe I am wrong.
  13. Joshua Westerheide commented on patch set 4 04/06/18, 10:53

    ModuleLinkViewHelper.php:39 Reply

    I don't see any benefit neither. If someone really wants to write the query string as string rather than an array he could simply create a ViewHelper which converts the string to the array using `GeneralUtility::explodeUrl2Array` (e.g. `{'&my=query&string=1' -> n:queryString()'}`).
  14. Georg Ringer commented on patch set 4 04/27/18, 07:32

    a new parameter because this is public API
  15. Tymoteusz Motylewski commented on patch set 4 04/27/18, 10:11

    Georg, can you please give more context about this change? If I get you correctly you need this change to do some refactoring in BE? If this is so, an little example of code before and after using the new viewhelper would be awesome, so I would understand the use case. Thanks
  16. Susi Moog commented on patch set 4 04/29/18, 15:21

    @Tymek: see #cig-viewhelpers - we have multiple view helpers in the core doing basically the same thing. We want to refactor them to one generic base view helper and maybe add some more "action" specific viewhelper - like an edit record viewhelper or something.
  17. Susi Moog commented on patch set 4 04/29/18, 15:23

    ModuleLinkViewHelper.php:59 Reply

    should be ok, google and the rest of our code say so ;)
  18. Claus Due wrote 04/29/18, 15:32

    Removed reviewer Claus Due.
  19. Susi Moog uploaded patch set 5 04/29/18, 15:34

  20. Susi Moog commented on patch set 4 04/29/18, 15:34

    ModuleLinkViewHelper.php:39 Reply

    As the core mostly uses strings for route parameters at the moment, I'd either leave that argument as it is or directly add the other viewhelper, as it is pretty near impossible to migrate the string links in fluid to this viewhelper otherwise. I'll update the rst file with an example - so you can see what I mean.
  21. TYPO3com voted on patch set 5 V +1 04/29/18, 15:44 Completed build in 09m 44s on Sun, 29 Apr, 05:44 PM Test Summary: 31061 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-22987

  22. Susi Moog voted on patch set 5 V +1 CR +1 05/12/18, 09:21

  23. Mathias Schreiber voted on patch set 5 V +1 CR +1 05/12/18, 09:23

  24. Susi Moog voted on patch set 5 V +2 CR +2 05/12/18, 09:23

  25. Susi Moog merged patch set 6 05/12/18, 09:23