HasConfiguration for themes

Protected Properties

protected mixed $configCache

configCache keeps the cached configuration file values

Public Methods

public getConfig()

public getConfig(): array 

getConfig reads the theme.yaml file and returns the theme configuration values

public getConfigArray()

public getConfigArray($name): array 

getConfigArray returns an array value from the theme configuration file by its name

If the value is a string, it is treated as a YAML file and loaded.

public getConfigValue()

public getConfigValue($name, $default = null): void

getConfigValue returns a value from the theme configuration file by its name

public getFormConfig()

public getFormConfig(): array 

getFormConfig returns the dedicated form option that provide form fields for customization, this is an immutable accessor for that and also an solid anchor point for extension

public getPreviewImageUrl()

public getPreviewImageUrl(): string 

getPreviewImageUrl returns the theme preview image URL

If the image file doesn't exist returns the placeholder image URL.

public writeConfig()

public writeConfig($values = [], $overwrite = false): void

writeConfig to the theme.yaml file with the supplied array values

Protected Methods

protected writeComposerFile()

protected writeComposerFile($data): void

writeComposerFile writes to a composer file for a theme