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 | Type | Description |
---|---|---|
$theme | string |
string
Theme code/namespace |
Returns
void
public findByDirName ($dirName) : string
Returns an installed theme's code from it's dirname.
Parameters
Property | Type | Description |
---|---|---|
$dirName | mixed |
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 | Type | Description |
---|---|---|
$name | string |
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 | Type | Description |
---|---|---|
$code | string |
string
Theme code |
$dirName | string | null |
string | null
|
Returns
mixed
public setUninstalled (string $code)
Flags a theme as being uninstalled.
Parameters
Property | Type | Description |
---|---|---|
$code | string |
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 | Type | Description |
---|---|---|
$container | mixed |
mixed
|
Returns
void
inherited
public
static
final
instance ($container = null
)
: static
Inherited from
Singleton
Create a new instance of this singleton.
Parameters
Property | Type | Description |
---|---|---|
$container | mixed |
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