Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
FirstRunWizardFinishedEvent example
$currentState
=
$this
->
getFrwState
(
)
;
if
(
$failed
)
{
$newState
= FrwState::
failedState
(
null,
$currentState
->
getFailureCount
(
)
+ 1
)
;
}
else
{
$this
->trackingEventClient->
fireTrackingEvent
(
self::TRACKING_EVENT_FRW_FINISHED
)
;
$newState
= FrwState::
completedState
(
)
;
}
$this
->
setFrwStatus
(
$newState
)
;
$this
->eventDispatcher->
dispatch
(
new
FirstRunWizardFinishedEvent
(
$newState
,
$currentState
,
$context
)
)
;
}
public
function
frwShouldRun
(
)
: bool
{
if
(
!
$this
->frwAutoRun
)
{
return
false;
}
$status
=
$this
->
getFrwState
(
)
;
if
(
$status
->
isCompleted
(
)
)
{
return
false;
}