Validator
in package
implements
AlwaysNewStrategyInterface
Class Validator
Checks if a theme can be opened in StyleEdit4.
theme.json
-
-
-
- Must be a valid json
-
-
-
-
-
- content must be an object
-
-
-
-
-
- content must have an id
-
-
-
-
-
- content must have a config object
-
-
-
-
-
-
-
-
-
- with a basics & areas object
-
-
-
-
-
-
Interfaces, Classes and Traits
- AlwaysNewStrategyInterface
- Interface AlwaysNewStrategyInterface
Table of Contents
- $filesystemThemes : FilesystemAdapter
- $styleEditConfiguration : StyleEditConfiguration
- $themeCanBeOpenedInStyleEdit4 : bool
- $themeName : string
- __construct() : mixed
- Validator constructor.
- canBeOpenedInStyleEdit4() : bool
- for() : Validator
- getThemesFolder() : string
- validateThemeJson() : void
Properties
$filesystemThemes
protected
FilesystemAdapter
$filesystemThemes
$styleEditConfiguration
protected
StyleEditConfiguration
$styleEditConfiguration
$themeCanBeOpenedInStyleEdit4
protected
bool
$themeCanBeOpenedInStyleEdit4
= true
$themeName
protected
string
$themeName
Methods
__construct()
Validator constructor.
public
__construct(string $themeName, FilesystemAdapter $filesystemThemes, StyleEditConfiguration $styleEditConfiguration) : mixed
Parameters
- $themeName : string
- $filesystemThemes : FilesystemAdapter
- $styleEditConfiguration : StyleEditConfiguration
Tags
Return values
mixed —canBeOpenedInStyleEdit4()
public
canBeOpenedInStyleEdit4() : bool
Return values
bool —for()
public
static for(string $themeName[, FilesystemAdapter|null $adapter = null ]) : Validator
Parameters
- $themeName : string
- $adapter : FilesystemAdapter|null = null
Tags
Return values
Validator —getThemesFolder()
protected
getThemesFolder() : string
Return values
string —validateThemeJson()
protected
validateThemeJson() : void