Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
ScriptAppInformation example
$product3
->
build
(
)
,
]
,
$this
->context
)
;
}
private
function
installApp
(
string
$appDir
)
: ScriptAppInformation
{
$this
->
loadAppsFromDir
(
$appDir
)
;
/** @var AppEntity $app */
$app
=
$this
->
getContainer
(
)
->
get
(
'app.repository'
)
->
search
(
new
Criteria
(
)
, Context::
createDefaultContext
(
)
)
->
first
(
)
;
return
new
ScriptAppInformation
(
$app
->
getId
(
)
,
$app
->
getName
(
)
,
$app
->
getIntegrationId
(
)
)
;
}
private
function
getExistingTaxId
(
)
: string
{
/** @var EntityRepository $taxRepository */
$taxRepository
=
$this
->
getContainer
(
)
->
get
(
'tax.repository'
)
;
static
::
assertEquals
(
'system_config',
$extension
->
get
(
'systemConfig'
)
)
;
static
::
assertEquals
(
'app_config',
$extension
->
get
(
'appConfig'
)
)
;
}
private
function
installApp
(
string
$appDir
)
: ScriptAppInformation
{
$this
->
loadAppsFromDir
(
$appDir
)
;
/** @var AppEntity $app */
$app
=
$this
->
getContainer
(
)
->
get
(
'app.repository'
)
->
search
(
new
Criteria
(
)
, Context::
createDefaultContext
(
)
)
->
first
(
)
;
return
new
ScriptAppInformation
(
$app
->
getId
(
)
,
$app
->
getName
(
)
,
$app
->
getIntegrationId
(
)
)
;
}
}
$product3
->
build
(
)
,
]
, Context::
createDefaultContext
(
)
)
;
}
private
function
installApp
(
string
$appDir
)
: ScriptAppInformation
{
$this
->
loadAppsFromDir
(
$appDir
)
;
/** @var AppEntity $app */
$app
=
$this
->
getContainer
(
)
->
get
(
'app.repository'
)
->
search
(
new
Criteria
(
)
, Context::
createDefaultContext
(
)
)
->
first
(
)
;
return
new
ScriptAppInformation
(
$app
->
getId
(
)
,
$app
->
getName
(
)
,
$app
->
getIntegrationId
(
)
)
;
}
}
/** * @param ScriptInfo|IncludesInfo $script */
private
function
getAppInfo
(
array
$script
)
: ?ScriptAppInformation
{
if
(
!
$script
[
'app_id'
]
|| !
$script
[
'appName'
]
|| !
$script
[
'integrationId'
]
)
{
return
null;
}
return
new
ScriptAppInformation
(
$script
[
'app_id'
]
,
$script
[
'appName'
]
,
$script
[
'integrationId'
]
)
;
}
}