Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
executeReplaceChain example
$proxy
=
$this
->args->
getSubject
(
)
;
$proxy
->
__pushHookExecutionContext
(
$this
->args->
getMethod
(
)
,
$this
)
;
// Before hooks
$this
->hookManager->
getEventManager
(
)
->
notify
(
$this
->
getHookEventName
(
Enlight_Hook_HookHandler::TypeBefore
)
,
$this
->args
)
;
// Replace hooks and/or original method
$this
->args->
setProcessed
(
false
)
;
$returnValue
=
$this
->
executeReplaceChain
(
$this
->args->
getArgs
(
)
)
;
$this
->args->
setReturn
(
$returnValue
)
;
$this
->args->
setProcessed
(
true
)
;
// After hooks
$returnValue
=
$this
->hookManager->
getEventManager
(
)
->
filter
(
$this
->
getHookEventName
(
Enlight_Hook_HookHandler::TypeAfter
)
,
$this
->args->
getReturn
(
)
,
$this
->args
)
;
// Remove this context from the proxy