/**
* Create rewrite rules for blog articles
* Used in multiple locations
*
* @param int|null $offset
* @param int|null $limit
*/
public function sCreateRewriteTableBlog($offset = null,
$limit = null, ?ShopContextInterface
$context = null
) { $query =
$this->modelManager->
getRepository(Category::
class) ->
getBlogCategoriesByParentQuery(Shopware()->
Shop()->
get('parentID'
));
$blogCategories =
$query->
getArrayResult();
// get all blog category ids
$blogCategoryIds =
[];
foreach ($blogCategories as $blogCategory) { $blogCategoryIds[] =
$blogCategory['id'
];
} if ($context === null
) { $context =
$this->contextService->
getShopContext();
}