ResourceUtility

readonly class \TYPO3\CMS\Adminpanel\Utility\ResourceUtility

Table of Contents

Methods

__construct()  : mixed
getAdditionalResourcesForModules()  : array{js: string, css: string}
Get additional resources (css, js) from modules and merge it to one array - returns an array of full html tags
getResources()  : array
Return a string with tags for main admin panel resources
getCssTag()  : string
Get a css tag for file - with absolute web path resolving
getJsTag()  : string
Get a script tag for JavaScript with absolute paths

Methods

getAdditionalResourcesForModules()

Get additional resources (css, js) from modules and merge it to one array - returns an array of full html tags

public getAdditionalResourcesForModules(ModuleInterface[] $modules, array<string, string|ConsumableNonce> $attributes, ServerRequestInterface $request) : array{js: string, css: string}

Parameters

$modules : ModuleInterface[]
$attributes : array<string, string|ConsumableNonce>
$request : ServerRequestInterface

Return values

array{js: string, css: string}

getResources()

Return a string with tags for main admin panel resources

public getResources(array<string, string|ConsumableNonce> $attributes, ServerRequestInterface $request) : array

Parameters

$attributes : array<string, string|ConsumableNonce>
$request : ServerRequestInterface

Return values

array

getCssTag()

Get a css tag for file - with absolute web path resolving

protected getCssTag(string $cssFileLocation, array<string, string|ConsumableNonce> $attributes, ServerRequestInterface $request) : string

Parameters

$cssFileLocation : string
$attributes : array<string, string|ConsumableNonce>
$request : ServerRequestInterface

Return values

string

getJsTag()

Get a script tag for JavaScript with absolute paths

protected getJsTag(string $jsFileLocation, array<string, string|ConsumableNonce> $attributes, ServerRequestInterface $request) : string

Parameters

$jsFileLocation : string
$attributes : array<string, string|ConsumableNonce>
$request : ServerRequestInterface

Return values

string
On this page