(int) $child['id_prestablog_news'], 'seo' => $child['link_rewrite'], 'titre' => $child['title'], 'id_lang' => (int) $child['id_lang'], ] ); } // Categories $urlsInfos = CategoriesClass::getListeNoArbo(1, (int) $id_lang); foreach ($urlsInfos as $child) { $urls[] = PrestaBlog::prestablogUrl([ 'c' => (int)$child['id_prestablog_categorie'], 'titre' => ($child['link_rewrite'] != '' ? $child['link_rewrite'] : $child['title']), 'id_lang' => (int)$child['id_lang'], ]); } return $urls; } /** * An estimated number of URLs that will be returned by self::getJprestaAllURLs() for the current shop context. * Since we don't have the id_lang parameter we recommend to return the number of URLs for the language that have * the most URLs. * @return int The estimated number of URLs to warmup for the current shop context */ public static function getJprestaAllURLsCount() { $queryCountArticle = 'SELECT count(*) FROM `'._DB_PREFIX_.'prestablog_news` WHERE actif=1 AND id_shop=' . (int) Shop::getContextShopID(); $queryCountCategories = 'SELECT count(*) FROM `'._DB_PREFIX_.'prestablog_categorie` WHERE actif=1 AND id_shop=' . (int) Shop::getContextShopID(); return (int) JPresta\SpeedPack\JprestaUtils::dbGetValue($queryCountArticle) + (int) JPresta\SpeedPack\JprestaUtils::dbGetValue($queryCountCategories); } }