Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getReferrerRevenue example
$this
->
send
(
$splice
, \
count
(
$data
)
)
;
}
/** * @return void */
public
function
getReferrerRevenueAction
(
)
{
$shop
=
$this
->
getManager
(
)
->
getRepository
(
Shop::
class
)
->
getActiveDefault
(
)
;
$this
->
get
(
ShopRegistrationServiceInterface::
class
)
->
registerShop
(
$shop
)
;
$result
=
$this
->
getRepository
(
)
->
getReferrerRevenue
(
$shop
,
$this
->
getFromDate
(
)
,
$this
->
getToDate
(
)
)
;
$referrer
=
[
]
;
foreach
(
$result
->
getData
(
)
as
$row
)
{
$host
=
parse_url
(
$row
[
'referrer'
]
, PHP_URL_HOST
)
;
if
(
!\
is_string
(
$host
)
)
{
continue
;
}