$this->
findStruct($data,
$item);
} } $this->
findStruct($data,
$struct);
} private function findStruct(SeoResolverData
$data, Struct
$struct): void
{ if ($struct instanceof Entity
) { $definition =
$this->definitionInstanceRegistry->
getByEntityClass($struct) ??
$this->salesChannelDefinitionInstanceRegistry->
getByEntityClass($struct);
if ($definition &&
$definition->
isSeoAware()) { $data->
add($definition->
getEntityName(),
$struct);
} } foreach ($struct->
getVars() as $item) { if ($item instanceof Collection
) { foreach ($item as $collectionItem) { if ($collectionItem instanceof Struct
) { $this->
findStruct($data,
$collectionItem);
} } }