Documentation

TemplateResources
in package

Class collects resources for page.

Any including components can add to the page their own resources without having access to the application or template.

Table of Contents

$cssFiles  : array<string|int, string>
Custom CSS files to be included
$jsFiles  : array<string|int, string>
Custom JS files to be included
addCssFile()  : void
Additing single CSS file
addCssFiles()  : void
Additing multyple CSS files
addJsFile()  : void
Additing single CSS file
addJsFiles()  : void
Additing multyple CSS files
clear()  : void
Method clears loaded resources.
compileResources()  : string
Method returns compiled page resources
getCssFiles()  : array<string|int, mixed>
Method returning added CSS files
getJsFiles()  : array<string|int, mixed>
Method returning added JS files

Properties

$cssFiles

Custom CSS files to be included

private array<string|int, string> $cssFiles = []

$jsFiles

Custom JS files to be included

private array<string|int, string> $jsFiles = []

Methods

addCssFile()

Additing single CSS file

public addCssFile(string $cssFile) : void
Parameters
$cssFile : string

CSS file

Return values
void

addCssFiles()

Additing multyple CSS files

public addCssFiles(array<string|int, string> $cssFiles) : void
Parameters
$cssFiles : array<string|int, string>

CSS files

Return values
void

addJsFile()

Additing single CSS file

public addJsFile(string $jsFile) : void
Parameters
$jsFile : string

JS file

Return values
void

addJsFiles()

Additing multyple CSS files

public addJsFiles(array<string|int, string> $jsFiles) : void
Parameters
$jsFiles : array<string|int, string>

JS files

Return values
void

clear()

Method clears loaded resources.

public clear() : void
Return values
void

compileResources()

Method returns compiled page resources

public compileResources() : string
Return values
string

Compiled resources includers

getCssFiles()

Method returning added CSS files

public getCssFiles() : array<string|int, mixed>
Return values
array<string|int, mixed>

list of CSS files

getJsFiles()

Method returning added JS files

public getJsFiles() : array<string|int, mixed>
Return values
array<string|int, mixed>

list of JS files

Search results

    Яндекс.Метрика