ThemeService
in package
implements
ThemeServiceInterface
Class ThemeService
Interfaces, Classes and Traits
- ThemeServiceInterface
- Class ThemeServiceInterface
Table of Contents
- $cacheControl : CacheControl
- $repository : ThemeRepositoryInterface
- $contentWriteService : ContentWriteService
- $entryStorage : ThemeContentManagerEntryStorage
- $locker : RoutineLockerInterface
- $queryBuilder : CI_DB_query_builder
- __construct() : mixed
- ThemeService constructor.
- activateTheme() : mixed
- Activates a theme for the shop.
- buildTemporaryTheme() : void
- build a temporary theme.
- getAvailableThemes() : ThemeNameCollection
- Get Available themes.
- storeThemeContent() : mixed
- Stores the theme contents.
- clearCache() : void
- Clear all theme related cache files
- storeAllThemeContent() : mixed
- Stores the theme content.
- storeOnlyNewThemeContent() : mixed
- Only stores theme content that has an ID and hasnt been stored before.
Properties
$cacheControl
protected
CacheControl
$cacheControl
$repository
protected
ThemeRepositoryInterface
$repository
$contentWriteService
private
ContentWriteService
$contentWriteService
$entryStorage
private
ThemeContentManagerEntryStorage
$entryStorage
$locker
private
RoutineLockerInterface
$locker
$queryBuilder
private
CI_DB_query_builder
$queryBuilder
Methods
__construct()
ThemeService constructor.
public
__construct(ThemeRepositoryInterface $repository, CacheControl $cacheControl, ThemeContentManagerEntryStorage $entryStorage, CI_DB_query_builder $queryBuilder, ContentWriteService $contentWriteService, RoutineLockerInterface $locker) : mixed
Parameters
- $repository : ThemeRepositoryInterface
- $cacheControl : CacheControl
- $entryStorage : ThemeContentManagerEntryStorage
- $queryBuilder : CI_DB_query_builder
- $contentWriteService : ContentWriteService
- $locker : RoutineLockerInterface
Return values
mixed —activateTheme()
Activates a theme for the shop.
public
activateTheme(string $themeName) : mixed
Parameters
- $themeName : string
Tags
Return values
mixed —buildTemporaryTheme()
build a temporary theme.
public
buildTemporaryTheme(ThemeId $themeId, ThemeSettingsInterface $settings) : void
Parameters
- $themeId : ThemeId
- $settings : ThemeSettingsInterface
Tags
Return values
void —getAvailableThemes()
Get Available themes.
public
getAvailableThemes(ThemeDirectoryRootInterface $source) : ThemeNameCollection
Parameters
- $source : ThemeDirectoryRootInterface
Return values
ThemeNameCollection —storeThemeContent()
Stores the theme contents.
public
storeThemeContent(ThemeId $themeId, ThemeContents $themeContents) : mixed
Parameters
- $themeId : ThemeId
- $themeContents : ThemeContents
Tags
Return values
mixed —clearCache()
Clear all theme related cache files
protected
clearCache() : void
Return values
void —storeAllThemeContent()
Stores the theme content.
private
storeAllThemeContent(ThemeContents $themeContents) : mixed
Parameters
- $themeContents : ThemeContents
Return values
mixed —storeOnlyNewThemeContent()
Only stores theme content that has an ID and hasnt been stored before.
private
storeOnlyNewThemeContent(ThemeContents $themeContents) : mixed
Parameters
- $themeContents : ThemeContents