Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getUserLanguage example
$data
=
$this
->
getCachedVersion
(
)
;
if
(
!
isset
(
$data
->checks
)
)
{
$this
->
View
(
)
->
assign
(
[
'success' => true,
]
)
;
return
;
}
$user
=
Shopware
(
)
->
Container
(
)
->
get
(
'auth'
)
->
getIdentity
(
)
;
$userLang
=
$this
->
getUserLanguage
(
$user
)
;
$namespace
=
$this
->
get
(
'snippets'
)
->
getNamespace
(
'backend/swag_update/main'
)
;
$endpoint
=
$this
->container->
getParameter
(
'shopware.store.apiEndpoint'
)
;
$fileSystem
=
new
SwagUpdateFileSystem
(
)
;
$conn
=
$this
->
get
(
Connection::
class
)
;
$checks
=
[
new
RegexCheck
(
$userLang
)
,
new
MySQLVersionCheck
(
$namespace
)
,
new
PHPVersionCheck
(
$namespace
)
,