class ThemeSettingsManager implements BasicEntityManagerInterface

Class ThemeSettingsManager is injected as alligator.theme.settings.manager service. ThemeSettingsManager handles the logic for managed entity.

Constants

THEME_DIR

Themes Dir location

WEB_RESOURCE_DIR

Resource Dir

DO_NOT_DELETE_KEYS

Redis key that shouldn't be deleted while removing cached templates

Methods

__construct(ContainerInterface $container)

ThemeSettingsManager constructor.

array
getAllFrontendThemes()

Search themes directory for all frontend themes

bool
exportTheme(string $theme)

Export theme to zip file

bool
uploadTheme(string $base64, string $themeName)

Upload theme zip

bool
uploadThemeBkp(string $base64, string $themeName)

Upload theme zip

bool
installThemeByName(string $theme)

Install theme by name

array
getCurrentThemes()

Get current theme names

array
getThemePreviews(array $themes)

Find themes preview images

bool
deleteTheme(string $themeName)

Remove theme by name

string
renderThemeGrid(string|null $currentFrontendTheme = null)

Render theme grid

generateCssForTheme(string $themeName, Client $cache, string $projectRoot)

Generate css for theme

Details

at line 75
__construct(ContainerInterface $container)

ThemeSettingsManager constructor.

Parameters

ContainerInterface $container

at line 84
array getAllFrontendThemes()

Search themes directory for all frontend themes

Return Value

array

at line 105
bool exportTheme(string $theme)

Export theme to zip file

Parameters

string $theme

Return Value

bool

at line 123
bool uploadTheme(string $base64, string $themeName)

Upload theme zip

Parameters

string $base64
string $themeName

Return Value

bool

Exceptions

Exception

at line 185
bool uploadThemeBkp(string $base64, string $themeName)

Upload theme zip

Parameters

string $base64
string $themeName

Return Value

bool

Exceptions

Exception

at line 245
bool installThemeByName(string $theme)

Install theme by name

Parameters

string $theme

Return Value

bool

at line 334
array getCurrentThemes()

Get current theme names

Return Value

array

at line 348
array getThemePreviews(array $themes)

Find themes preview images

Parameters

array $themes

Return Value

array

at line 381
bool deleteTheme(string $themeName)

Remove theme by name

Parameters

string $themeName

Return Value

bool

Exceptions

Exception

at line 410
string renderThemeGrid(string|null $currentFrontendTheme = null)

Render theme grid

Parameters

string|null $currentFrontendTheme

Return Value

string

Exceptions

Error

at line 436
generateCssForTheme(string $themeName, Client $cache, string $projectRoot)

Generate css for theme

Parameters

string $themeName
Client $cache
string $projectRoot