ContentZoneRepository
in package
Class ContentZoneRepository
Table of Contents
- JSON_DEFAULT_PATTERN = '/\.default\.json$/i'
- JSON_FILE_PATTERN = '/\.json$/i'
- $currentTheme : CurrentThemeInterface
- $filesystem : FilesystemAdapter
- $shopBaseUrl : ShopBaseUrl
- __construct() : mixed
- ContentZoneRepository constructor.
- getAll() : ContentZoneData
- getById() : array<string|int, mixed>|mixed
- loadFirstOnThemeHierarchy() : array<string|int, mixed>|mixed
- saveContentZoneData() : void
- saveContentZoneTemplate() : void
- convertAbsoluteUrlToRelative() : string
- createContentZoneJson() : string
- loadContentZone() : array<string|int, mixed>|mixed
Constants
JSON_DEFAULT_PATTERN
protected
mixed
JSON_DEFAULT_PATTERN
= '/\.default\.json$/i'
JSON_FILE_PATTERN
protected
string
JSON_FILE_PATTERN
= '/\.json$/i'
Properties
$currentTheme
protected
CurrentThemeInterface
$currentTheme
$filesystem
protected
FilesystemAdapter
$filesystem
$shopBaseUrl
protected
ShopBaseUrl
$shopBaseUrl
Methods
__construct()
ContentZoneRepository constructor.
public
__construct(CurrentThemeInterface $currentTheme, FilesystemAdapter $filesystem, ShopBaseUrl $shopBaseUrl) : mixed
Parameters
- $currentTheme : CurrentThemeInterface
- $filesystem : FilesystemAdapter
- $shopBaseUrl : ShopBaseUrl
Return values
mixed —getAll()
public
getAll() : ContentZoneData
Tags
Return values
ContentZoneData —getById()
public
getById(string $id) : array<string|int, mixed>|mixed
Parameters
- $id : string
Tags
Return values
array<string|int, mixed>|mixed —loadFirstOnThemeHierarchy()
public
loadFirstOnThemeHierarchy(BasicThemeInterface $theme, $contentZoneId) : array<string|int, mixed>|mixed
Parameters
- $theme : BasicThemeInterface
- $contentZoneId :
Tags
Return values
array<string|int, mixed>|mixed —saveContentZoneData()
public
saveContentZoneData(ContentZoneOption $option) : void
Parameters
- $option : ContentZoneOption
Tags
Return values
void —saveContentZoneTemplate()
public
saveContentZoneTemplate(ContentZoneOption $option, Language $languageCode) : void
Parameters
- $option : ContentZoneOption
- $languageCode : Language
Tags
Return values
void —convertAbsoluteUrlToRelative()
protected
convertAbsoluteUrlToRelative(string $url) : string
Parameters
- $url : string
Return values
string —createContentZoneJson()
protected
createContentZoneJson(ContentZoneOption $option) : string
Parameters
- $option : ContentZoneOption
Return values
string —loadContentZone()
protected
loadContentZone(string $contentZoneFile) : array<string|int, mixed>|mixed
Parameters
- $contentZoneFile : string