Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
url_rewrites_invalid.php
Go to the documentation of this file.
1 <?php
10 require __DIR__ . '/url_rewrites.php';
11 
17  \Magento\UrlRewrite\Model\UrlRewrite::class
18 );
19 $rewrite->setStoreId(
20  1
21 )->setIdPath(
22  'product/1/4'
23 )->setRequestPath(
24  'category-2/simple-product.html'
25 )->setTargetPath(
26  'catalog/product/view/id/1'
27 )->setIsSystem(
28  1
29 )->setCategoryId(
30  4
31 )->setProductId(
32  1
33 )->save();
34 
39  \Magento\UrlRewrite\Model\UrlRewrite::class
40 );
41 $rewrite->setStoreId(
42  1
43 )->setIdPath(
44  'product/1/5'
45 )->setRequestPath(
46  'category-5/simple-product.html'
47 )->setTargetPath(
48  'catalog/product/view/id/1'
49 )->setIsSystem(
50  1
51 )->setCategoryId(
52  5
53 )->setProductId(
54  1
55 )->save();
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition: _bootstrap.php:60