ThemeManifest
class ThemeManifest implements ThemeList (View source)
A class which builds a manifest of all themes (which is really just a directory called "templates")
Constants
TEMPLATES_DIR |
|
Properties
protected | string | $base | Base path |
|
protected | string | $project | Path to application code |
|
protected | CacheInterface | $cache | Cache | |
protected | string | $cacheKey | Cache key |
|
protected | string[] | $themes | List of theme root directories |
|
protected | CacheFactory | $cacheFactory |
Methods
Constructs a new template manifest. The manifest is not actually built or loaded from cache until needed.
No description
Generate a unique cache key to avoid manifest cache collisions.
Regenerates the manifest by scanning the base path.
Add a directory to the manifest
Details
__construct(string $base, string $project = null, CacheFactory $cacheFactory = null)
Constructs a new template manifest. The manifest is not actually built or loaded from cache until needed.
init(bool $includeTests = false, bool $forceRegen = false, array $ignoredCIConfigs = [])
No description
string
getBase()
No description
string
getCacheKey(bool $includeTests = false)
Generate a unique cache key to avoid manifest cache collisions.
We compartmentalise based on the base path, the given project, and whether or not we intend to include tests.
array
getThemes()
No description
regenerate(bool $includeTests = false, array $ignoredCIConfigs = [])
Regenerates the manifest by scanning the base path.
handleDirectory(string $basename, string $pathname, int $depth)
Add a directory to the manifest
$this
setProject(string $project)
Sets the project