class ThemeOptionsManager implements BasicEntityManagerInterface

Class ThemeOptionsManager is injected as alligator.theme.options.manager service. ThemeOptionsManager handles the logic for managed entity.

Methods

__construct(ContainerInterface $container, ThemeOptionsRepository $repository)

ThemeManager constructor.

getOptionsById(int $id)

Find theme options by id

getCurrentPresetForTheme(int $id)

Find theme options for specific theme

saveThemePreset(ThemeOptions $preset)

Check for all preconditions, create references to all foreign entities, persist new theme options and update current if needed

execCommand()

Execute assets command

string
generateStyleForPreset(ThemeOptions $preset)

Render style for specific theme

mixed
saveCurrentPreset(ThemeOptions $preset, ThemeOptions $currentPreset = null)

Persist new theme option and set current theme options

Theme|null
getThemeByPk(int $id)

Find theme by id

bool
deleteThemePreset(int $id)

Delete theme options

Details

at line 61
__construct(ContainerInterface $container, ThemeOptionsRepository $repository)

ThemeManager constructor.

Parameters

ContainerInterface $container
ThemeOptionsRepository $repository

at line 75
ThemeOptions|null getOptionsById(int $id)

Find theme options by id

Parameters

int $id

Return Value

ThemeOptions|null

Exceptions

NonUniqueResultException

at line 88
ThemeOptions|null getCurrentPresetForTheme(int $id)

Find theme options for specific theme

Parameters

int $id

Return Value

ThemeOptions|null

Exceptions

NonUniqueResultException

at line 100
saveThemePreset(ThemeOptions $preset)

Check for all preconditions, create references to all foreign entities, persist new theme options and update current if needed

Parameters

ThemeOptions $preset

Exceptions

NonUniqueResultException

at line 156
execCommand()

Execute assets command

at line 179
string generateStyleForPreset(ThemeOptions $preset)

Render style for specific theme

Parameters

ThemeOptions $preset

Return Value

string

Exceptions

Error

at line 196
mixed saveCurrentPreset(ThemeOptions $preset, ThemeOptions $currentPreset = null)

Persist new theme option and set current theme options

Parameters

ThemeOptions $preset
ThemeOptions $currentPreset

Return Value

mixed

Exceptions

Exception

at line 207
Theme|null getThemeByPk(int $id)

Find theme by id

Parameters

int $id

Return Value

Theme|null

at line 220
bool deleteThemePreset(int $id)

Delete theme options

Parameters

int $id

Return Value

bool

Exceptions

Exception