Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
createBundleTheme example
$criteria
=
new
Criteria
(
)
;
$criteria
->
addFilter
(
new
EqualsFilter
(
'name',
$name
)
)
;
/** @var ThemeEntity $childTheme */
$childTheme
=
$this
->themeRepository->
search
(
$criteria
,
$this
->context
)
->
first
(
)
;
$factory
=
$this
->
getContainer
(
)
->
get
(
StorefrontPluginConfigurationFactory::
class
)
;
$simpleThemeConfig
=
$factory
->
createFromBundle
(
new
SimpleThemeConfigInheritance
(
)
)
;
$name
=
$this
->
createBundleTheme
(
$simpleThemeConfig
,
$childTheme
)
;
$criteria
=
new
Criteria
(
)
;
$criteria
->
addFilter
(
new
EqualsFilter
(
'name',
$name
)
)
;
/** @var ThemeEntity $childTheme */
$childTheme
=
$this
->themeRepository->
search
(
$criteria
,
$this
->context
)
->
first
(
)
;
$childThemeFields
=
$this
->themeService->
getThemeConfigurationStructuredFields
(
$childTheme
->
getId
(
)
, true,
$this
->context
)
;