This repository was archived by the owner on Apr 29, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +40
-1
lines changed
view/frontend/templates/swagger-ui Expand file tree Collapse file tree 2 files changed +40
-1
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ /***
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+ namespace Magento \Swagger \Helper ;
7
+
8
+ /**
9
+ * Class Data
10
+ * @package Magento\Swagger\Helper\Data
11
+ */
12
+ class Data extends \Magento \Framework \App \Helper \AbstractHelper
13
+ {
14
+
15
+ /**
16
+ * @var \Magento\Framework\App\Request\Http
17
+ */
18
+ protected $ request ;
19
+
20
+ /**
21
+ * @param \Magento\Framework\App\Helper\Context $context
22
+ * @param \Magento\Framework\App\Request\Http $request
23
+ */
24
+ public function __construct (
25
+ \Magento \Framework \App \Helper \Context $ context ,
26
+ \Magento \Framework \App \Request \Http $ request
27
+ ) {
28
+ $ this ->request = $ request ;
29
+ parent ::__construct ($ context );
30
+ }
31
+
32
+ /**
33
+ * @return mixed|string
34
+ */
35
+ public function getParamStore ()
36
+ {
37
+ return ($ this ->request ->getParam ('store ' )) ? $ this ->request ->getParam ('store ' ) : 'all ' ;
38
+ }
39
+ }
Original file line number Diff line number Diff line change 14
14
15
15
/** @var \Magento\Framework\View\Element\Template $block */
16
16
17
- $ schemaUrl = rtrim ($ block ->getBaseUrl (), '/ ' ) . '/rest/all /schema?services=all ' ;
17
+ $ schemaUrl = rtrim ($ block ->getBaseUrl (), '/ ' ) . '/rest/ ' . $ this -> helper ( ' Magento\Swagger\Helper\Data ' )-> getParamStore () . ' /schema?services=all ' ;
18
18
?>
19
19
20
20
<div id='header'>
You can’t perform that action at this time.
0 commit comments