Skip to content

Commit 8f4dcc1

Browse files
dependency injected in constructor
1 parent f6b8e49 commit 8f4dcc1

File tree

1 file changed

+6
-3
lines changed
  • app/code/Magento/Config/Block/System/Config

1 file changed

+6
-3
lines changed

app/code/Magento/Config/Block/System/Config/Form.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
131131
* @param \Magento\Framework\Data\FormFactory $formFactory
132132
* @param \Magento\Config\Model\Config\Factory $configFactory
133133
* @param \Magento\Config\Model\Config\Structure $configStructure
134+
* @param \Magento\Config\Model\Config\Reader\Source\Deployed\SettingChecker $settingChecker
134135
* @param \Magento\Config\Block\System\Config\Form\Fieldset\Factory $fieldsetFactory
135136
* @param \Magento\Config\Block\System\Config\Form\Field\Factory $fieldFactory
136137
* @param array $data
@@ -141,6 +142,7 @@ public function __construct(
141142
\Magento\Framework\Data\FormFactory $formFactory,
142143
\Magento\Config\Model\Config\Factory $configFactory,
143144
\Magento\Config\Model\Config\Structure $configStructure,
145+
\Magento\Config\Model\Config\Reader\Source\Deployed\SettingChecker $settingChecker,
144146
\Magento\Config\Block\System\Config\Form\Fieldset\Factory $fieldsetFactory,
145147
\Magento\Config\Block\System\Config\Form\Field\Factory $fieldFactory,
146148
array $data = []
@@ -150,6 +152,7 @@ public function __construct(
150152
$this->_configStructure = $configStructure;
151153
$this->_fieldsetFactory = $fieldsetFactory;
152154
$this->_fieldFactory = $fieldFactory;
155+
$this->settingChecker = $settingChecker;
153156

154157
$this->_scopeLabels = [
155158
self::SCOPE_DEFAULT => __('[GLOBAL]'),
@@ -416,7 +419,7 @@ private function getFieldData(\Magento\Config\Model\Config\Structure\Element\Fie
416419
{
417420
$data = $this->getAppConfigDataValue($path);
418421

419-
$placeholderValue = $this->getSettingChecker()->getPlaceholderValue(
422+
$placeholderValue = $this->settingChecker->getPlaceholderValue(
420423
$path,
421424
$this->getScope(),
422425
$this->getStringScopeCode()
@@ -805,12 +808,12 @@ private function getAppConfig()
805808
*/
806809
private function getReadOnly(\Magento\Config\Model\Config\Structure\Element\Field $field, $path)
807810
{
808-
$isReadOnly = $this->getSettingChecker()->isReadOnly(
811+
$isReadOnly = $this->settingChecker->isReadOnly(
809812
$path, ScopeConfigInterface::SCOPE_TYPE_DEFAULT
810813
);
811814
if (!$isReadOnly) {
812815
$isReadOnly = $this->getElementVisibility()->isDisabled($field->getPath())
813-
?: $this->getSettingChecker()->isReadOnly($path, $this->getScope(), $this->getStringScopeCode());
816+
?: $this->settingChecker->isReadOnly($path, $this->getScope(), $this->getStringScopeCode());
814817
}
815818
return $isReadOnly;
816819
}

0 commit comments

Comments
 (0)