Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setGlobalParam example
$this
->
Request
(
)
->
setHttpHost
(
(string)
$shop
->
getHost
(
)
)
->
setBasePath
(
$shop
->
getBasePath
(
)
)
->
setBaseUrl
(
$shop
->
getBasePath
(
)
)
;
$this
->
get
(
ShopRegistrationServiceInterface::
class
)
->
registerShop
(
$shop
)
;
Shopware
(
)
->
Session
(
)
->
set
(
'sUserGroup',
$mailing
[
'customergroup'
]
)
;
$sql
= 'SELECT * FROM s_core_customergroups WHERE groupkey=?';
Shopware
(
)
->
Session
(
)
->
set
(
'sUserGroupData',
Shopware
(
)
->
Db
(
)
->
fetchRow
(
$sql
,
[
$mailing
[
'customergroup'
]
]
)
)
;
Shopware
(
)
->
Container
(
)
->
get
(
RouterInterface::
class
)
->
setGlobalParam
(
'module', 'frontend'
)
;
Shopware
(
)
->
Config
(
)
->
offsetSet
(
'DontAttachSession', true
)
;
Shopware
(
)
->
Container
(
)
->
get
(
ContextServiceInterface::
class
)
->
initializeShopContext
(
)
;
return
$mailing
;
}
/** * @deprecated in 5.6, will be private in 5.8 * * Init template method * * Initializes the template using the mailing data. * * @param array $mailing * * @return Enlight_Template_Manager */
public
function
setGlobalParam
(
$name
,
$value
)
{
$this
->context->
setGlobalParam
(
$name
,
$value
)
;
return
$this
;
}
}