File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * Copyright © OpenGento, All rights reserved.
4+ * See LICENSE bundled with this library for license details.
5+ */
6+ declare (strict_types=1 );
7+
8+ namespace Opengento \StorePathUrl \Plugin \Model ;
9+
10+ use Magento \Framework \App \Request \Http ;
11+ use Magento \Framework \Exception \NoSuchEntityException ;
12+ use Magento \Store \Model \BaseUrlChecker as Subject ;
13+ use Magento \Store \Model \StoreManagerInterface ;
14+
15+ use function parse_url ;
16+
17+ class BaseUrlChecker
18+ {
19+ public function __construct (private StoreManagerInterface $ storeManager ) {}
20+
21+ /**
22+ * @throws NoSuchEntityException
23+ */
24+ public function beforeExecute (Subject $ subject , array $ uri , Http $ request ): array
25+ {
26+ return [parse_url ($ this ->storeManager ->getStore ()->getBaseUrl ()), $ request ];
27+ }
28+ }
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" ?>
2+ <!--
3+ /**
4+ * Copyright © OpenGento, All rights reserved.
5+ * See LICENSE bundled with this library for license details.
6+ */
7+ -->
8+ <config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:framework:ObjectManager/etc/config.xsd" >
9+ <type name =" Magento\Store\Model\BaseUrlChecker" >
10+ <plugin name =" Opengento_StorePathUrl::set_base_url_type_link_for_redirect" type =" Opengento\StorePathUrl\Plugin\Model\BaseUrlChecker" />
11+ </type >
12+ </config >
You can’t perform that action at this time.
0 commit comments