Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getComparisonUrl example
$firstUrl
=
$urls
[
0
]
;
static
::
assertSame
(
'hourly',
$firstUrl
->
getChangefreq
(
)
)
;
static
::
assertSame
(
0.5,
$firstUrl
->
getPriority
(
)
)
;
static
::
assertSame
(
ProductEntity::
class
,
$firstUrl
->
getResource
(
)
)
;
static
::
assertTrue
(
Uuid::
isValid
(
$firstUrl
->
getIdentifier
(
)
)
)
;
$host
=
$this
->
getHost
(
$this
->salesChannelContext
)
;
foreach
(
$products
as
$product
)
{
$urlGenerate
=
$this
->
getComparisonUrl
(
$product
[
'id'
]
)
;
$check
= false;
foreach
(
$urls
as
$url
)
{
if
(
$urlGenerate
===
$host
. '/' .
$url
->
getLoc
(
)
)
{
$check
= true;
break
;
}
}
static
::
assertTrue
(
$check
)
;
}
}