Source: ~/modules/cms/classes/ThemeManager.php

Theme manager

Protected properties

protected static $instance

Public methods

public void __clone()

public void __wakeup()

public void deleteTheme(string $theme)

Completely delete a theme from the system.

  • string $theme - Theme code/namespace

public string findByDirName($dirName)

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

  • $dirName

public static void forgetInstance()

Forget this singleton's instance if it exists

public array getInstalled()

Returns a collection of themes installed via the update gateway

public static void instance()

Create a new instance of this singleton.

public boolean isInstalled(string $name)

Checks if a theme has ever been installed before.

  • string $name - Theme code

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

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

  • string $code - Theme code
  • string|null $dirName

public void setUninstalled(string $code)

Flags a theme as being uninstalled.

  • string $code - Theme code

Protected methods

protected void __construct()


protected void init()

Initialize the singleton free from constructor parameters.