Review main Merged

82411[TASK] Avoid hard-coded table `tt_content` in GridColumnItem

Nikita Hovratov CR +2 V +2 Normal +73 −67 updated 01/09/24, 13:45

Commit message

This patch replaces all hard-coded occurrences with a class property,
allowing to set the table name as a constructor argument.

The page view could be way more flexible if it would allow to render
grid column items of other inline tables the same way as for tt_content
inside previews. This is done at the back of the mind to enable easy
Content Blocks backend previews for inline children.

Review

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

Issues 1

Files 2

Review log 1113

  1. Nikita Hovratov uploaded patch set 1 01/09/24, 09:37

  2. Mathias Brodala commented on patch set 1 01/09/24, 09:39

    GridColumn.php:84

    How about using CPP here? Thus "protected string $table = 'tt_content'", then remove the explicit property and assignment.
  3. core-ci voted on patch set 1 V +1 01/09/24, 09:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51314

  4. Daniel Siepmann commented on patch set 1 CR +1 01/09/24, 09:48

    GridColumnItem.php:244

    This potentially is not defined for all tables. I would add a check for isset or `?? null` and check whether `$enableCols` is an array afterwards.
  5. Daniel Siepmann voted on patch set 1 CR 0 01/09/24, 09:48

  6. Oli Bartsch uploaded patch set 2 V +1 01/09/24, 12:45

  7. Oli Bartsch commented on patch set 2 CR +1 V +1 01/09/24, 12:46

    GridColumn.php:84 Reply

    Done

    GridColumnItem.php:244 Reply

    Done
  8. core-ci voted on patch set 2 V +1 01/09/24, 12:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51328

  9. Benni Mack voted on patch set 2 CR +1 V +1 01/09/24, 12:59

  10. Daniel Siepmann voted on patch set 2 CR +1 01/09/24, 13:00

  11. Mathias Brodala voted on patch set 2 CR +1 01/09/24, 13:31

  12. Oli Bartsch voted on patch set 2 CR +2 V +2 01/09/24, 13:45

  13. Oli Bartsch merged patch set 3 01/09/24, 13:45