ThemeManager

Theme manager

 class Cms\Classes\ThemeManager

Traits

Trait Description
Singleton

Singleton trait.

Methods

public deleteTheme (string $theme) : void

Completely delete a theme from the system.

Parameters
Property Description
$theme
string

Theme code/namespace

Returns
void

public findByDirName ($dirName) : string

Returns an installed theme's code from it's dirname.

Parameters
Property Description
$dirName
mixed
Returns
string

public getInstalled () : array

Returns a collection of themes installed via the update gateway

Returns
array

public isInstalled (string $name) : bool

Checks if a theme has ever been installed before.

Parameters
Property Description
$name
string

Theme code

Returns
bool

public setInstalled (string $code, string | null $dirName = null)

Flags a theme as being installed, so it is not downloaded twice.

Parameters
Property Description
$code
string

Theme code

$dirName
string | null
Returns
mixed

public setUninstalled (string $code)

Flags a theme as being uninstalled.

Parameters
Property Description
$code
string

Theme code

Returns
mixed

inherited public __clone ()

Inherited from Singleton
Returns
mixed

inherited public __wakeup ()

Inherited from Singleton
Returns
mixed

inherited public static final forgetInstance ($container = null) : void

Inherited from Singleton

Forget this singleton's instance if it exists

Parameters
Property Description
$container
mixed
Returns
void

inherited public static final instance ($container = null) : static

Inherited from Singleton

Create a new instance of this singleton.

Parameters
Property Description
$container
mixed
Returns
static

inherited protected final __construct ()

Inherited from Singleton

Constructor.

Returns
mixed

inherited protected init ()

Inherited from Singleton

Initialize the singleton free from constructor parameters.

Returns
mixed
Copyright © 2024 Winter CMS