1 | <?php |
||
2 | /** |
||
3 | * Copyright © O2TI. All rights reserved. |
||
4 | * |
||
5 | * @author Bruno Elisei <[email protected]> |
||
6 | * See COPYING.txt for license details. |
||
7 | */ |
||
8 | |||
9 | namespace O2TI\AdvancedStreetAddress\Plugin; |
||
10 | |||
11 | use Magento\Customer\Block\Address\Edit; |
||
12 | use O2TI\AdvancedStreetAddress\Helper\Config; |
||
13 | |||
14 | /** |
||
15 | * CustomerAdvancedStreetAddress - Change Template. |
||
16 | */ |
||
17 | class CustomerAdvancedStreetAddress |
||
18 | { |
||
19 | /** |
||
20 | * @var Config |
||
21 | */ |
||
22 | private $config; |
||
23 | |||
24 | /** |
||
25 | * @param Config $config |
||
26 | */ |
||
27 | public function __construct( |
||
28 | Config $config |
||
29 | ) { |
||
30 | $this->config = $config; |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * Change Template. |
||
35 | * |
||
36 | * @param Edit $subject |
||
37 | * @param string $result |
||
38 | * |
||
39 | * @return string |
||
40 | */ |
||
41 | public function afterGetTemplate(Edit $subject, string $result): string |
||
0 ignored issues
–
show
|
|||
42 | { |
||
43 | if ($this->config->isEnabled()) { |
||
44 | if ($this->config->getConfigModule('apply_in_account')) { |
||
45 | return 'O2TI_AdvancedStreetAddress::account/address/edit.phtml'; |
||
46 | } |
||
47 | } |
||
48 | |||
49 | return $result; |
||
50 | } |
||
51 | } |
||
52 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.