Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
buildEventArgs example
public
function
notify
(
$event
,
$eventArgs
= null
)
{
if
(
!
$this
->
hasListeners
(
$event
)
)
{
return
null;
}
$eventArgs
=
$this
->
buildEventArgs
(
$eventArgs
)
;
$eventArgs
->
setReturn
(
null
)
;
$eventArgs
->
setName
(
$event
)
;
$eventArgs
->
setProcessed
(
false
)
;
foreach
(
$this
->
getListeners
(
$event
)
as
$listener
)
{
$listener
->
execute
(
$eventArgs
)
;
}
$eventArgs
->
setProcessed
(
true
)
;
return
$eventArgs
;
}