CoolCMS API

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: *.latte directly in layouts/ (not in subfolders such as modules / parts),
  • CSS: *.css in assets/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
Return values
array<string, string>
On this page

Search results