Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setIsDeleted example
$request
=
$this
->requestStack->
getMainRequest
(
)
;
$basePath
=
$request
?
$request
->
getBasePath
(
)
: '';
foreach
(
$entities
as
$entity
)
{
$seoUrl
=
new
SeoUrlEntity
(
)
;
$seoUrl
->
setForeignKey
(
$entity
->
getUniqueIdentifier
(
)
)
;
$seoUrl
->
setIsCanonical
(
true
)
;
$seoUrl
->
setIsModified
(
false
)
;
$seoUrl
->
setIsDeleted
(
false
)
;
$copy
=
clone
$seoUrl
;
$mapping
=
$seoUrlRoute
->
getMapping
(
$entity
,
$salesChannel
)
;
$copy
->
setError
(
$mapping
->
getError
(
)
)
;
$pathInfo
=
$this
->router->
generate
(
$config
->
getRouteName
(
)
,
$mapping
->
getInfoPathContext
(
)
)
;
$pathInfo
=
$this
->
removePrefix
(
$pathInfo
,
$basePath
)
;
$copy
->
setPathInfo
(
$pathInfo
)
;