$lastMod =
(new \
DateTime($lastMod))->
format(Defaults::STORAGE_DATE_TIME_FORMAT
);
$newUrl =
clone $url;
if (isset($seoUrls[$category['id'
]])) { $newUrl->
setLoc($seoUrls[$category['id'
]]['seo_path_info'
]);
} else { $newUrl->
setLoc($this->router->
generate('frontend.navigation.page',
['navigationId' =>
$category->
getId()], UrlGeneratorInterface::ABSOLUTE_PATH
));
} $newUrl->
setLastmod(new \
DateTime($lastMod));
$newUrl->
setChangefreq(self::CHANGE_FREQ
);
$newUrl->
setResource(CategoryEntity::
class);
$newUrl->
setIdentifier($category['id'
]);
$urls[] =
$newUrl;
} $keys =
array_keys($keys);
/** @var int|null $nextOffset */
$nextOffset =
array_pop($keys);
return new UrlResult($urls,
$nextOffset);
}