@@ -131,6 +131,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
131
131
* @param \Magento\Framework\Data\FormFactory $formFactory
132
132
* @param \Magento\Config\Model\Config\Factory $configFactory
133
133
* @param \Magento\Config\Model\Config\Structure $configStructure
134
+ * @param \Magento\Config\Model\Config\Reader\Source\Deployed\SettingChecker $settingChecker
134
135
* @param \Magento\Config\Block\System\Config\Form\Fieldset\Factory $fieldsetFactory
135
136
* @param \Magento\Config\Block\System\Config\Form\Field\Factory $fieldFactory
136
137
* @param array $data
@@ -141,6 +142,7 @@ public function __construct(
141
142
\Magento \Framework \Data \FormFactory $ formFactory ,
142
143
\Magento \Config \Model \Config \Factory $ configFactory ,
143
144
\Magento \Config \Model \Config \Structure $ configStructure ,
145
+ \Magento \Config \Model \Config \Reader \Source \Deployed \SettingChecker $ settingChecker ,
144
146
\Magento \Config \Block \System \Config \Form \Fieldset \Factory $ fieldsetFactory ,
145
147
\Magento \Config \Block \System \Config \Form \Field \Factory $ fieldFactory ,
146
148
array $ data = []
@@ -150,6 +152,7 @@ public function __construct(
150
152
$ this ->_configStructure = $ configStructure ;
151
153
$ this ->_fieldsetFactory = $ fieldsetFactory ;
152
154
$ this ->_fieldFactory = $ fieldFactory ;
155
+ $ this ->settingChecker = $ settingChecker ;
153
156
154
157
$ this ->_scopeLabels = [
155
158
self ::SCOPE_DEFAULT => __ ('[GLOBAL] ' ),
@@ -416,7 +419,7 @@ private function getFieldData(\Magento\Config\Model\Config\Structure\Element\Fie
416
419
{
417
420
$ data = $ this ->getAppConfigDataValue ($ path );
418
421
419
- $ placeholderValue = $ this ->getSettingChecker () ->getPlaceholderValue (
422
+ $ placeholderValue = $ this ->settingChecker ->getPlaceholderValue (
420
423
$ path ,
421
424
$ this ->getScope (),
422
425
$ this ->getStringScopeCode ()
@@ -805,12 +808,12 @@ private function getAppConfig()
805
808
*/
806
809
private function getReadOnly (\Magento \Config \Model \Config \Structure \Element \Field $ field , $ path )
807
810
{
808
- $ isReadOnly = $ this ->getSettingChecker () ->isReadOnly (
811
+ $ isReadOnly = $ this ->settingChecker ->isReadOnly (
809
812
$ path , ScopeConfigInterface::SCOPE_TYPE_DEFAULT
810
813
);
811
814
if (!$ isReadOnly ) {
812
815
$ isReadOnly = $ this ->getElementVisibility ()->isDisabled ($ field ->getPath ())
813
- ?: $ this ->getSettingChecker () ->isReadOnly ($ path , $ this ->getScope (), $ this ->getStringScopeCode ());
816
+ ?: $ this ->settingChecker ->isReadOnly ($ path , $ this ->getScope (), $ this ->getStringScopeCode ());
814
817
}
815
818
return $ isReadOnly ;
816
819
}
0 commit comments