|
7 | 7 |
|
8 | 8 | namespace Magento\UrlRewrite\Controller\Adminhtml\Url\Rewrite;
|
9 | 9 |
|
| 10 | +use Magento\Backend\App\Action\Context; |
10 | 11 | use Magento\Catalog\Api\ProductRepositoryInterface;
|
| 12 | +use Magento\CatalogUrlRewrite\Model\CategoryUrlPathGenerator; |
| 13 | +use Magento\CatalogUrlRewrite\Model\ProductUrlPathGenerator; |
| 14 | +use Magento\CmsUrlRewrite\Model\CmsPageUrlPathGenerator; |
11 | 15 | use Magento\Framework\App\Action\HttpPostActionInterface as HttpPostActionInterface;
|
12 | 16 | use Magento\Framework\Exception\LocalizedException;
|
13 | 17 | use Magento\UrlRewrite\Model\UrlFinderInterface;
|
@@ -41,11 +45,12 @@ class Save extends \Magento\UrlRewrite\Controller\Adminhtml\Url\Rewrite implemen
|
41 | 45 | protected ProductRepositoryInterface $productRepository;
|
42 | 46 |
|
43 | 47 | /**
|
44 |
| - * @param \Magento\Backend\App\Action\Context $context |
45 |
| - * @param \Magento\CatalogUrlRewrite\Model\ProductUrlPathGenerator $productUrlPathGenerator |
46 |
| - * @param \Magento\CatalogUrlRewrite\Model\CategoryUrlPathGenerator $categoryUrlPathGenerator |
47 |
| - * @param \Magento\CmsUrlRewrite\Model\CmsPageUrlPathGenerator $cmsPageUrlPathGenerator |
| 48 | + * @param Context $context |
| 49 | + * @param ProductUrlPathGenerator $productUrlPathGenerator |
| 50 | + * @param CategoryUrlPathGenerator $categoryUrlPathGenerator |
| 51 | + * @param CmsPageUrlPathGenerator $cmsPageUrlPathGenerator |
48 | 52 | * @param UrlFinderInterface $urlFinder
|
| 53 | + * @param ProductRepositoryInterface|null $productRepository |
49 | 54 | */
|
50 | 55 | public function __construct(
|
51 | 56 | \Magento\Backend\App\Action\Context $context,
|
@@ -123,6 +128,8 @@ protected function getTargetPath($model)
|
123 | 128 | }
|
124 | 129 |
|
125 | 130 | /**
|
| 131 | + * Generate canonical product / category path |
| 132 | + * |
126 | 133 | * @return string
|
127 | 134 | */
|
128 | 135 | protected function getCanonicalTargetPath()
|
@@ -157,6 +164,8 @@ private function _handleCmsPageUrlRewrite($model)
|
157 | 164 | }
|
158 | 165 |
|
159 | 166 | /**
|
| 167 | + * Process save URL rewrite request |
| 168 | + * |
160 | 169 | * @return void
|
161 | 170 | */
|
162 | 171 | public function execute()
|
|
0 commit comments