Skip to content

Commit 9131146

Browse files
author
Dale Sikkema
committed
MAGETWO-31485: Move Config Components to a Separate Module
- create Config module - move related classes and configuration from Backend and Core to Config - update module dependency graph accordingly
1 parent ba82edc commit 9131146

File tree

454 files changed

+1827
-1564
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

454 files changed

+1827
-1564
lines changed

app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ protected function _getConfigUrl()
6767
) {
6868
$output = $this->_urlBuilder->getUrl('adminhtml/system_config/edit', ['section' => 'web']);
6969
} else {
70-
/** @var $dataCollection \Magento\Core\Model\Resource\Config\Data\Collection */
70+
/** @var $dataCollection \Magento\Config\Model\Resource\Config\Data\Collection */
7171
$dataCollection = $this->_configValueFactory->create()->getCollection();
7272
$dataCollection->addValueFilter(\Magento\Store\Model\Store::BASE_URL_PLACEHOLDER);
7373

app/code/Magento/AdminNotification/etc/adminhtml/system.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
* See COPYING.txt for license details.
66
*/
77
-->
8-
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../Backend/etc/system_file.xsd">
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../Config/etc/system_file.xsd">
99
<system>
1010
<section id="system">
1111
<group id="adminnotification" translate="label" type="text" sortOrder="250" showInDefault="1" showInWebsite="0" showInStore="0">
1212
<label>Notifications</label>
1313
<field id="use_https" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
1414
<label>Use HTTPS to Get Feed</label>
15-
<source_model>Magento\Backend\Model\Config\Source\Yesno</source_model>
15+
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
1616
</field>
1717
<field id="frequency" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="0" showInStore="0">
1818
<label>Update Frequency</label>
1919
<source_model>Magento\AdminNotification\Model\Config\Source\Frequency</source_model>
2020
</field>
2121
<field id="last_update" translate="label" type="label" sortOrder="3" showInDefault="1" showInWebsite="0" showInStore="0">
2222
<label>Last Update</label>
23-
<frontend_model>Magento\Backend\Block\System\Config\Form\Field\Notification</frontend_model>
23+
<frontend_model>Magento\Config\Block\System\Config\Form\Field\Notification</frontend_model>
2424
</field>
2525
</group>
2626
</section>

app/code/Magento/Backend/App/UserConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88
namespace Magento\Backend\App;
99

10-
use Magento\Backend\Model\Config\Factory;
10+
use Magento\Config\Model\Config\Factory;
1111
use Magento\Framework\App\Bootstrap;
1212
use Magento\Framework\App\Console\Response;
1313
use Magento\Framework\AppInterface;

app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* @author Magento Core Team <core@magentocommerce.com>
1515
*/
16-
class Reset extends \Magento\Backend\Block\System\Config\Form\Field
16+
class Reset extends \Magento\Config\Block\System\Config\Form\Field
1717
{
1818
/**
1919
* Pasge robots default instructions
@@ -39,7 +39,7 @@ public function __construct(
3939
protected function _construct()
4040
{
4141
parent::_construct();
42-
$this->setTemplate('page/system/config/robots/reset.phtml');
42+
$this->setTemplate('Magento_Config::page/system/config/robots/reset.phtml');
4343
}
4444

4545
/**

app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class Dependence extends \Magento\Backend\Block\AbstractBlock
4040
protected $_configOptions = [];
4141

4242
/**
43-
* @var \Magento\Backend\Model\Config\Structure\Element\Dependency\FieldFactory
43+
* @var \Magento\Config\Model\Config\Structure\Element\Dependency\FieldFactory
4444
*/
4545
protected $_fieldFactory;
4646

@@ -52,13 +52,13 @@ class Dependence extends \Magento\Backend\Block\AbstractBlock
5252
/**
5353
* @param \Magento\Backend\Block\Context $context
5454
* @param \Magento\Framework\Json\EncoderInterface $jsonEncoder
55-
* @param \Magento\Backend\Model\Config\Structure\Element\Dependency\FieldFactory $fieldFactory
55+
* @param \Magento\Config\Model\Config\Structure\Element\Dependency\FieldFactory $fieldFactory
5656
* @param array $data
5757
*/
5858
public function __construct(
5959
\Magento\Backend\Block\Context $context,
6060
\Magento\Framework\Json\EncoderInterface $jsonEncoder,
61-
\Magento\Backend\Model\Config\Structure\Element\Dependency\FieldFactory $fieldFactory,
61+
\Magento\Config\Model\Config\Structure\Element\Dependency\FieldFactory $fieldFactory,
6262
array $data = []
6363
) {
6464
$this->_jsonEncoder = $jsonEncoder;
@@ -84,13 +84,13 @@ public function addFieldMap($fieldId, $fieldName)
8484
*
8585
* @param string $fieldName
8686
* @param string $fieldNameFrom
87-
* @param \Magento\Backend\Model\Config\Structure\Element\Dependency\Field|string $refField
87+
* @param \Magento\Config\Model\Config\Structure\Element\Dependency\Field|string $refField
8888
* @return \Magento\Backend\Block\Widget\Form\Element\Dependence
8989
*/
9090
public function addFieldDependence($fieldName, $fieldNameFrom, $refField)
9191
{
9292
if (!is_object($refField)) {
93-
/** @var $refField \Magento\Backend\Model\Config\Structure\Element\Dependency\Field */
93+
/** @var $refField \Magento\Config\Model\Config\Structure\Element\Dependency\Field */
9494
$refField = $this->_fieldFactory->create(
9595
['fieldData' => ['value' => (string)$refField], 'fieldPrefix' => '']
9696
);
@@ -139,7 +139,7 @@ protected function _getDependsJson()
139139
$result = [];
140140
foreach ($this->_depends as $to => $row) {
141141
foreach ($row as $from => $field) {
142-
/** @var $field \Magento\Backend\Model\Config\Structure\Element\Dependency\Field */
142+
/** @var $field \Magento\Config\Model\Config\Structure\Element\Dependency\Field */
143143
$result[$this->_fields[$to]][$this->_fields[$from]] = [
144144
'values' => $field->getValues(),
145145
'negative' => $field->isNegative(),

app/code/Magento/Backend/Model/Config/Structure/Element/Iterator/Group.php

Lines changed: 0 additions & 17 deletions
This file was deleted.

app/code/Magento/Backend/Model/Config/Structure/Element/Iterator/Section.php

Lines changed: 0 additions & 17 deletions
This file was deleted.

app/code/Magento/Backend/Model/Config/Structure/Element/Iterator/Tab.php

Lines changed: 0 additions & 17 deletions
This file was deleted.

app/code/Magento/Backend/Model/Menu/Builder/CommandFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function __construct(\Magento\Framework\ObjectManagerInterface $objectMan
2828
*
2929
* @param string $commandName
3030
* @param array $data
31-
* @return \Magento\Backend\Model\Config
31+
* @return \Magento\Config\Model\Config
3232
*/
3333
public function create($commandName, array $data = [])
3434
{

app/code/Magento/Backend/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
The Backend module contains common infrastructure and assets for other modules to be defined and used in their
22
administration user interface (UI). It does not contain anything specific to other modules. Among many things it
3-
handles the logic of authenticating and authorizing users, configuring locale, layout, search, session, translation and
4-
several other configurations for admin user.
3+
handles the logic of authenticating and authorizing users.

0 commit comments

Comments
 (0)