|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace B2Binpay\Payment\Model\System\Config\Backend; |
|
4
|
|
|
|
|
5
|
|
|
use Magento\Framework\App\Cache\TypeListInterface; |
|
|
|
|
|
|
6
|
|
|
use Magento\Framework\App\Config\ScopeConfigInterface; |
|
|
|
|
|
|
7
|
|
|
use Magento\Framework\Data\Collection\AbstractDb; |
|
|
|
|
|
|
8
|
|
|
use Magento\Framework\Model\Context; |
|
|
|
|
|
|
9
|
|
|
use Magento\Framework\Model\ResourceModel\AbstractResource; |
|
|
|
|
|
|
10
|
|
|
use Magento\Framework\Registry; |
|
|
|
|
|
|
11
|
|
|
use B2Binpay\Payment\Helper\Wallets as WalletsHelper; |
|
12
|
|
|
|
|
13
|
|
|
/** |
|
14
|
|
|
* Backend for serialized array data |
|
15
|
|
|
*/ |
|
16
|
|
|
class Wallets extends \Magento\Framework\App\Config\Value |
|
|
|
|
|
|
17
|
|
|
{ |
|
18
|
|
|
/** |
|
19
|
|
|
* @var WalletsHelper |
|
20
|
|
|
*/ |
|
21
|
|
|
protected $walletsHelper = null; |
|
22
|
|
|
|
|
23
|
|
|
/** |
|
24
|
|
|
* @param Context $context |
|
25
|
|
|
* @param Registry $registry |
|
26
|
|
|
* @param ScopeConfigInterface $config |
|
27
|
|
|
* @param TypeListInterface $cacheTypeList |
|
28
|
|
|
* @param WalletsHelper $walletsHelper |
|
29
|
|
|
* @param AbstractResource $resource |
|
30
|
|
|
* @param AbstractDb $resourceCollection |
|
31
|
|
|
* @param array $data |
|
32
|
|
|
*/ |
|
33
|
|
|
public function __construct( |
|
34
|
|
|
Context $context, |
|
35
|
|
|
Registry $registry, |
|
36
|
|
|
ScopeConfigInterface $config, |
|
37
|
|
|
TypeListInterface $cacheTypeList, |
|
38
|
|
|
WalletsHelper $walletsHelper, |
|
39
|
|
|
AbstractResource $resource = null, |
|
40
|
|
|
AbstractDb $resourceCollection = null, |
|
41
|
|
|
array $data = [] |
|
42
|
|
|
) { |
|
43
|
|
|
$this->walletsHelper = $walletsHelper; |
|
44
|
|
|
parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data); |
|
45
|
|
|
} |
|
46
|
|
|
|
|
47
|
|
|
/** |
|
48
|
|
|
* Process data after load |
|
49
|
|
|
* |
|
50
|
|
|
* @return void |
|
51
|
|
|
*/ |
|
52
|
|
|
protected function _afterLoad() |
|
53
|
|
|
{ |
|
54
|
|
|
$value = $this->getValue(); |
|
55
|
|
|
$value = $this->walletsHelper->makeArrayFieldValue($value); |
|
56
|
|
|
$this->setValue($value); |
|
57
|
|
|
} |
|
58
|
|
|
|
|
59
|
|
|
/** |
|
60
|
|
|
* Prepare data before save |
|
61
|
|
|
* |
|
62
|
|
|
* @return void |
|
63
|
|
|
*/ |
|
64
|
|
|
public function beforeSave() |
|
65
|
|
|
{ |
|
66
|
|
|
$value = $this->getValue(); |
|
67
|
|
|
$value = $this->walletsHelper->makeStorableArrayFieldValue($value); |
|
68
|
|
|
$this->setValue($value); |
|
69
|
|
|
} |
|
70
|
|
|
} |
|
71
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths