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

+1-1
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

+3-3
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

+1-1
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

+2-2
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

+6-6
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

-17
This file was deleted.

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

-17
This file was deleted.

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

-17
This file was deleted.

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

+1-1
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

+1-2
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.

app/code/Magento/Backend/composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"magento/module-customer": "0.42.0-beta9",
2121
"magento/module-translation": "0.42.0-beta9",
2222
"magento/module-require-js": "0.42.0-beta9",
23+
"magento/module-config": "0.42.0-beta9",
2324
"magento/framework": "0.42.0-beta9",
2425
"magento/magento-composer-installer": "*"
2526
},

app/code/Magento/Backend/etc/acl.xml

-12
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,6 @@
2626
<resource id="Magento_Backend::stores" title="Stores" sortOrder="80">
2727
<resource id="Magento_Backend::stores_settings" title="Settings" sortOrder="10">
2828
<resource id="Magento_Backend::store" title="All Stores" sortOrder="10"/>
29-
<resource id="Magento_Backend::config" title="Configuration" sortOrder="20">
30-
<resource id="Magento_Backend::advanced" title="Advanced Section" sortOrder="90" />
31-
<resource id="Magento_Backend::config_admin" title="Advanced Admin Section" sortOrder="100" />
32-
<resource id="Magento_Backend::config_design" title="Design Section" sortOrder="40" />
33-
<resource id="Magento_Backend::config_general" title="General Section" sortOrder="20" />
34-
<resource id="Magento_Backend::config_system" title="System Section" sortOrder="80" />
35-
<resource id="Magento_Backend::currency" title="Currency Setup Section" sortOrder="120" />
36-
<resource id="Magento_Backend::dev" title="Developer Section" sortOrder="110" />
37-
<resource id="Magento_Backend::web" title="Web Section" sortOrder="30" />
38-
<resource id="Magento_Backend::trans_email" title="Store Email Addresses Section" sortOrder="100" />
39-
<resource id="Magento_Backend::sendfriend" title="Email to a Friend" sortOrder="140" />
40-
</resource>
4129
</resource>
4230
<resource id="Magento_Backend::stores_attributes" title="Attributes" sortOrder="40" />
4331
<resource id="Magento_Backend::stores_other_settings" title="Other Settings" sortOrder="50" />

app/code/Magento/Backend/etc/adminhtml/di.xml

-4
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
<preference for="Magento\Framework\App\Action\Context" type="Magento\Backend\App\Action\Context" />
1212
<preference for="Magento\Framework\UrlInterface" type="Magento\Backend\Model\UrlInterface" />
1313
<preference for="Magento\Backend\Model\Auth\StorageInterface" type="Magento\Backend\Model\Auth\Session" />
14-
<preference for="Magento\Backend\Model\Config\Structure\SearchInterface" type="Magento\Backend\Model\Config\Structure" />
15-
<preference for="Magento\Backend\Model\Config\Backend\File\RequestData\RequestDataInterface" type="Magento\Backend\Model\Config\Backend\File\RequestData" />
1614
<preference for="Magento\Framework\App\DefaultPathInterface" type="Magento\Backend\App\DefaultPath" />
1715
<preference for="Magento\Backend\App\ConfigInterface" type="Magento\Backend\App\Config" />
1816
<preference for="Magento\Framework\App\Response\Http\FileFactory" type="Magento\Backend\App\Response\Http\FileFactory" />
@@ -37,8 +35,6 @@
3735
<argument name="backendUrl" xsi:type="object">Magento\Backend\Model\UrlInterface\Proxy</argument>
3836
</arguments>
3937
</type>
40-
<type name="Magento\Backend\Model\Config\Structure\Element\Iterator\Tab" shared="false" />
41-
<type name="Magento\Backend\Model\Config\Structure\Element\Iterator\Section" shared="false" />
4238
<type name="Magento\Framework\View\Layout">
4339
<arguments>
4440
<argument name="area" xsi:type="string">adminhtml</argument>

app/code/Magento/Backend/etc/adminhtml/menu.xml

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<add id="Magento_Backend::system_currency" title="Currency" module="Magento_Backend" sortOrder="30" parent="Magento_Backend::stores" action="adminhtml/system_currency" resource="Magento_CurrencySymbol::system_currency"/>
1212
<add id="Magento_Backend::system_variable" title="Custom Variables" module="Magento_Backend" sortOrder="20" parent="Magento_Backend::system_other_settings" action="adminhtml/system_variable" resource="Magento_Backend::variable"/>
1313
<add id="Magento_Backend::system_store" title="All Stores" module="Magento_Core" sortOrder="10" parent="Magento_Backend::stores_settings" action="adminhtml/system_store/" resource="Magento_Backend::store"/>
14-
<add id="Magento_Backend::system_config" title="Configuration" module="Magento_Backend" sortOrder="20" parent="Magento_Backend::stores_settings" action="adminhtml/system_config" resource="Magento_Backend::config"/>
1514
<add id="Magento_Backend::dashboard" title="Dashboard" module="Magento_Backend" sortOrder="10" action="adminhtml/dashboard" resource="Magento_Backend::dashboard"/>
1615
<add id="Magento_Backend::system" title="System" module="Magento_Backend" sortOrder="80" resource="Magento_Backend::system"/>
1716
<add id="Magento_Backend::system_tools" title="Tools" module="Magento_Backend" sortOrder="50" parent="Magento_Backend::system" resource="Magento_Backend::tools"/>

0 commit comments

Comments
 (0)