55 */
66namespace Magento \CloudComponents \Console \Command ;
77
8+ use Magento \CloudComponents \Model \UrlFixer ;
89use Magento \Framework \App \Area ;
910use Magento \Framework \App \State ;
1011use Magento \Framework \Console \Cli ;
1415use Magento \Store \Model \StoreManagerInterface ;
1516use Magento \UrlRewrite \Controller \Adminhtml \Url \Rewrite ;
1617use Magento \UrlRewrite \Model \UrlFinderInterface ;
18+ use Magento \UrlRewrite \Service \V1 \Data \UrlRewrite ;
1719use Symfony \Component \Console \Command \Command ;
1820use Symfony \Component \Console \Input \InputInterface ;
1921use Symfony \Component \Console \Input \InputOption ;
2022use Symfony \Component \Console \Output \OutputInterface ;
21- use Magento \UrlRewrite \Service \V1 \Data \UrlRewrite ;
2223
2324/**
2425 * Returns list of category or cms-page urls for given stores
@@ -51,6 +52,11 @@ class ConfigShowEntityUrlsCommand extends Command
5152 */
5253 private $ state ;
5354
55+ /**
56+ * @var UrlFixer
57+ */
58+ private $ urlFixer ;
59+
5460 /**
5561 * @var array
5662 */
@@ -61,17 +67,20 @@ class ConfigShowEntityUrlsCommand extends Command
6167 * @param UrlFinderInterface $urlFinder
6268 * @param UrlFactory $urlFactory
6369 * @param State $state
70+ * @param UrlFixer $urlFixer
6471 */
6572 public function __construct (
6673 StoreManagerInterface $ storeManager ,
6774 UrlFinderInterface $ urlFinder ,
6875 UrlFactory $ urlFactory ,
69- State $ state
76+ State $ state ,
77+ UrlFixer $ urlFixer
7078 ) {
7179 $ this ->storeManager = $ storeManager ;
7280 $ this ->urlFinder = $ urlFinder ;
7381 $ this ->urlFactory = $ urlFactory ;
7482 $ this ->state = $ state ;
83+ $ this ->urlFixer = $ urlFixer ;
7584
7685 parent ::__construct ();
7786 }
@@ -157,7 +166,7 @@ private function getPageUrls(array $stores, string $entityType): array
157166 ]);
158167
159168 foreach ($ entities as $ urlRewrite ) {
160- $ urls [] = $ url ->getUrl ($ urlRewrite ->getRequestPath ());
169+ $ urls [] = $ this -> urlFixer -> run ( $ store , $ url ->getUrl ($ urlRewrite ->getRequestPath () ));
161170 }
162171 }
163172
0 commit comments