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

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 3