select('ml.url') ->from('menu_links', 'ml') ->where(\Query\Operator::equals(['show_in_search' => 'Y'])) ->andWhere('ml.type='.MenuUtil::TYPE_PAGE) ->andWhere(Translation::coalesceTranslatedFields(MenuLinksTranslation::class, ['figure', 'name', 'link', 'url'])) ->having('figure="Y"') ->orderBy('list_order', 'ASC') ->execute(); foreach ($menuList as $menu) { $url = $cfg['Addr']['full'].ltrim($menu['url'], '/'); yield [ 'loc' => $url, 'priority' => '0.7', 'changefreq' => 'monthly', ]; } } }