Project

General

Profile

Actions

Feature #91715

closed

Make new AssetCollector class searchable

Added by Luis García almost 4 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2020-06-26
Due date:
% Done:

100%

Estimated time:
PHP Version:
7.3
Tags:
AssetCollector
Complexity:
easy
Sprint Focus:
Remote Sprint

Description

Sometimes the generation of inline code is quite heavy and one wants to avoid doing it multiple times. In my opinion, the class "TYPO3\CMS\Core\Page\AssetCollector" from TYPO3 10+ should have methods to query the internal status of the class.

The existence of a generated inline JavaScript could be asked by using a hypothetical "hasInlineJavaScript(string $identifier): bool" method, thus avoiding to generate it again when used multiple times during the same request.

An analog method "getInlineJavaScript" could also be of some use, but I still didn't found any advantage for it.

Possible implementation of proposed methods:

public function hasInlineJavaScript(string $identifier): bool
{
    return isset($this->inlineJavaScripts[$identifier]);
}

public function getInlineJavaScript(string $identifier): ?array
{
    return $this->inlineJavaScripts[$identifier] ?? null;
}
Actions #1

Updated by Mathias Schreiber about 2 years ago

  • Sprint Focus set to Remote Sprint
Actions #2

Updated by Susanne Moog about 2 years ago

  • Complexity changed from no-brainer to easy
Actions #3

Updated by Gerrit Code Review about 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74162

Actions #4

Updated by Gerrit Code Review about 2 years ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74162

Actions #5

Updated by Gerrit Code Review about 2 years ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74162

Actions #6

Updated by Gerrit Code Review about 2 years ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74162

Actions #7

Updated by Gerrit Code Review about 2 years ago

Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74162

Actions #8

Updated by Gerrit Code Review about 2 years ago

Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74162

Actions #9

Updated by Gerrit Code Review about 2 years ago

Patch set 7 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74162

Actions #10

Updated by Gerrit Code Review about 2 years ago

Patch set 8 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74162

Actions #11

Updated by Shehfinaz Kadavil about 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #12

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF