TemplateFileScanner
in package
FinalYes
Scans the files of the active front end theme (template1/…) for the select fields of the admin page form.
Pure helper: the caller PageManager resolves the
theme path (through the Front ThemeManager) and passes the absolute base dir of the
desktop variant:
- layouts:
*.lattedirectly inlayouts/(not in subfolders such asmodules/parts), - CSS:
*.cssinassets/css/(without.map).
Table of Contents
Methods
- cssFiles() : array<string, string>
- Returns the theme CSS files as `filename => filename` (e.g. `style.css`).
- layoutFiles() : array<string, string>
- Returns the theme layout templates as `filename => filename` (e.g. `@layout_one.latte`).
- scan() : array<string, string>
- Returns the sorted file names (without path) in the folder matching the mask.
Methods
cssFiles()
Returns the theme CSS files as `filename => filename` (e.g. `style.css`).
public
cssFiles(string|null $themeBaseDir) : array<string, string>
Parameters
- $themeBaseDir : string|null
Return values
array<string, string>layoutFiles()
Returns the theme layout templates as `filename => filename` (e.g. `@layout_one.latte`).
public
layoutFiles(string|null $themeBaseDir) : array<string, string>
Parameters
- $themeBaseDir : string|null
Return values
array<string, string>scan()
Returns the sorted file names (without path) in the folder matching the mask.
private
scan(string|null $dir, string $pattern) : array<string, string>
Parameters
- $dir : string|null
- $pattern : string