File tree Expand file tree Collapse file tree 5 files changed +14
-4
lines changed Expand file tree Collapse file tree 5 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ public function __construct(UrlRewriteCollectionFactory $rewriteCollectionFactor
34
34
* @return RewriteMap
35
35
* @throws InputException
36
36
*/
37
- public function findByStoreAndType (int $ storeId , int $ redirectType ): RewriteMap
37
+ public function getByStoreAndType (int $ storeId , int $ redirectType ): RewriteMap
38
38
{
39
39
if (!in_array ($ redirectType , self ::ALLOWED_REDIRECT_TYPES )) {
40
40
throw new InputException (
Original file line number Diff line number Diff line change @@ -47,10 +47,10 @@ public function saveRewriteMapsForAllStores(): void
47
47
foreach ($ this ->storeManager ->getStores () as $ store ) {
48
48
$ storeId = (int )$ store ->getId ();
49
49
$ this ->saveRewriteMap (
50
- $ this ->urlRewriteRepository ->findByStoreAndType ($ storeId , UrlRewriteOptionProvider::PERMANENT )
50
+ $ this ->urlRewriteRepository ->getByStoreAndType ($ storeId , UrlRewriteOptionProvider::PERMANENT )
51
51
);
52
52
$ this ->saveRewriteMap (
53
- $ this ->urlRewriteRepository ->findByStoreAndType ($ storeId , UrlRewriteOptionProvider::TEMPORARY )
53
+ $ this ->urlRewriteRepository ->getByStoreAndType ($ storeId , UrlRewriteOptionProvider::TEMPORARY )
54
54
);
55
55
}
56
56
}
Original file line number Diff line number Diff line change 6
6
<field id =" rewrite_maps_generation_enabled" showInDefault =" 1" showInStore =" 1" showInWebsite =" 1"
7
7
sortOrder =" 500" translate =" label" type =" select" >
8
8
<label >Enable Rewrite Maps Generation</label >
9
+ <comment >
10
+ <![CDATA[ Enables the generation of rewrite maps files from the Magento UrlRewrites.
11
+ The files are saved under
12
+ path_to_magento/var/rewrite_map/map/rewrite-map-[REDIRECT_TYPE]-store-[STORE_ID].txt]]>
13
+ </comment >
9
14
<source_model >Magento\Config\Model\Config\Source\Yesno</source_model >
10
15
</field >
16
+ <field id =" rewrite_maps_generation_cron_schedule" showInDefault =" 1" showInStore =" 1" showInWebsite =" 1"
17
+ sortOrder =" 510" translate =" label" type =" text" >
18
+ <label >Rewrite Maps Generation Cron Schedule</label >
19
+ </field >
11
20
</group >
12
21
</section >
13
22
</system >
Original file line number Diff line number Diff line change 4
4
<catalog >
5
5
<seo >
6
6
<rewrite_maps_generation_enabled >0</rewrite_maps_generation_enabled >
7
+ <rewrite_maps_generation_cron_schedule >0 * * * *</rewrite_maps_generation_cron_schedule >
7
8
</seo >
8
9
</catalog >
9
10
</default >
Original file line number Diff line number Diff line change 3
3
<group id =" default" >
4
4
<job instance =" IntegerNet\RewriteMap\Cron\GenerateRewriteMaps" method =" execute"
5
5
name =" integernet_rewritemap_generaterewritemaps" >
6
- <schedule >0 * * * *</ schedule >
6
+ <config_path >catalog/seo/rewrite_maps_generation_cron_schedule</ config_path >
7
7
</job >
8
8
</group >
9
9
</config >
You can’t perform that action at this time.
0 commit comments