Review main Merged

74162[FEATURE] Add methods to check if the assets already exist

Shehfinaz Kadavil CR +2 V +2 Normal +99 −0 updated 04/14/22, 20:27

Commit message

Different asset types  could be collected using the central
assets collector '\TYPO3\CMS\Core\Page\AssetCollector'.
However, it was not possible to check if a specific assets
has been added already.

This patch adds corresponding has() methods for the asset
types to the collector class to give extension developers
the ability to check and react before adding assets under
the same identifier.

Added methods:

* hasJavaScript(...)
* hasInlineJavaScript(...)
* hasStyleSheet(...)
* hasInlineStyleSheet(...)
* hasMedia(...)`

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Stefan Bürk +1
  • Verified V +2 Done
    • Benni Mack +2
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 1927

Show 2 earlier messages
  1. Shehfinaz Kadavil uploaded patch set 1 04/04/22, 12:07

  2. Shehfinaz Kadavil updated the commit message in patch set 2 04/04/22, 12:10

  1. core-ci voted on patch set 1 V +1 04/04/22, 12:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25398

  2. core-ci voted on patch set 2 V +1 04/04/22, 12:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25399

  3. Andreas Kienast voted on patch set 2 CR +1 04/04/22, 13:58

  4. Simon Schaufelberger commented on patch set 2 04/08/22, 00:07

    AssetCollector.php:228

    Should this method not be singular (hasJavaScript) because you check if ONE javascript with ONE identifier exists?
  5. Shehfinaz Kadavil uploaded patch set 3 04/08/22, 09:06

  6. Shehfinaz Kadavil commented on patch set 3 04/08/22, 09:10

    Hi, I have corrected the method name, please let me know if its ok.
  7. core-ci voted on patch set 3 V -1 04/08/22, 09:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25819

  8. Andreas Kienast commented on patch set 4 04/08/22, 09:42

    Published edit on patch set 3.
  9. core-ci voted on patch set 4 V -1 04/08/22, 09:50 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25822

  10. Andreas Kienast uploaded patch set 5 04/08/22, 09:55

  11. core-ci voted on patch set 5 V -1 04/08/22, 10:05 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25824

  12. Andreas Kienast commented on patch set 6 04/08/22, 10:15

    Published edit on patch set 5.
  13. core-ci voted on patch set 6 V +1 04/08/22, 10:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25825

  14. Simon Schaufelberger commented on patch set 6 V +1 CR +1 04/08/22, 11:30

    AssetCollector.php:228 Reply

    Done
  15. Stefan Bürk commented on patch set 6 CR -1 04/08/22, 18:44

    Feature-91715-MakeNewAssetCollectorClassSearchable.rst:4

    "searchable" is a missleading description. AssetCollector do not get really searchable at all. Many developers may associate with searchable things like wildcard, like, placeholder, part search etc. This patch is all about adding a "has asset identifier set". So this should be rephrased to match more what this feature is about.

    Feature-91715-MakeNewAssetCollectorClassSearchable.rst:18

    We should add some code example here - which would make this feature more clearer than "words".
  16. Shehfinaz Kadavil uploaded patch set 7 04/14/22, 13:34

  17. Stefan Bürk commented on patch set 7 CR -1 04/14/22, 13:40

    on it
  18. Shehfinaz Kadavil commented on patch set 7 04/14/22, 13:41

    Please check the changes and let me know if its ok.

    Feature-91715-MakeNewAssetCollectorClassSearchable.rst:4 Reply

    Done

    Feature-91715-MakeNewAssetCollectorClassSearchable.rst:18 Reply

    Done
  19. core-ci voted on patch set 7 V +1 04/14/22, 13:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26022

  20. Stefan Bürk uploaded patch set 8 04/14/22, 14:27

  21. Stefan Bürk commented on patch set 8 V +1 CR +1 04/14/22, 14:31

    Thanks for this patch.
  22. Shehfinaz Kadavil commented on patch set 8 04/14/22, 14:32

    Reply

    Thanks for the patch :)
  23. core-ci voted on patch set 8 V +1 04/14/22, 14:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26024

  24. Benni Mack voted on patch set 8 V +2 CR +2 04/14/22, 20:27

  25. Benni Mack merged patch set 9 04/14/22, 20:27