ThemeRepository
in package
implements
ThemeRepositoryInterface
Class ThemeRepository
Interfaces, Classes and Traits
- ThemeRepositoryInterface
- Interface ThemeRepositoryInterface
Table of Contents
- $reader : ThemeReaderInterface
- $writer : ThemeWriterInterface
- __construct() : mixed
- ThemeRepository constructor.
- getAvailableThemes() : ThemeNameCollection
- Returns available themes as collection.
- getById() : ThemeInterface
- Returns the theme by given id.
- save() : void
- Saves the theme.
Properties
$reader
protected
ThemeReaderInterface
$reader
$writer
protected
ThemeWriterInterface
$writer
Methods
__construct()
ThemeRepository constructor.
public
__construct(ThemeReaderInterface $reader, ThemeWriterInterface $writer) : mixed
Parameters
- $reader : ThemeReaderInterface
- $writer : ThemeWriterInterface
Return values
mixed —getAvailableThemes()
Returns available themes as collection.
public
getAvailableThemes(ThemeDirectoryRootInterface $source) : ThemeNameCollection
Parameters
- $source : ThemeDirectoryRootInterface
Return values
ThemeNameCollection —getById()
Returns the theme by given id.
public
getById(ThemeId $id, ThemeDirectoryRootInterface $source) : ThemeInterface
Parameters
- $id : ThemeId
- $source : ThemeDirectoryRootInterface
Return values
ThemeInterface —save()
Saves the theme.
public
save(ThemeInterface $theme, ThemeDirectoryRootInterface $destination) : void
Parameters
- $theme : ThemeInterface
- $destination : ThemeDirectoryRootInterface