Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
eventArgsClass example
// Fix cron action name
$action
=
$job
->
getAction
(
)
;
if
(
strpos
(
$action
, 'Shopware_'
)
!== 0
)
{
$action
=
str_replace
(
' ', '',
ucwords
(
str_replace
(
'_', ' ',
$job
->
getAction
(
)
)
)
)
;
$job
->
setAction
(
'Shopware_CronJob_' .
$action
)
;
}
try
{
$this
->adapter->
startJob
(
$job
)
;
/** @var Enlight_Components_Cron_EventArgs $jobArgs */
$jobArgs
=
new
$this
->
eventArgsClass
(
[
'subject' =>
$this
,
'job' =>
$job
,
]
)
;
$jobArgs
->
setReturn
(
$job
->
getData
(
)
)
;
$jobArgs
=
$this
->eventManager->
notifyUntil
(
$job
->
getAction
(
)
,
$jobArgs
)
;
if
(
$jobArgs
!== null
)
{