|
| 1 | +<?php |
| 2 | +ini_set('display_startup_errors', 1);ini_set('display_errors', 1); error_reporting(-1); |
| 3 | +use Magento\Theme\Model\Theme\Collection; |
| 4 | +use Magento\Framework\App\Area; |
| 5 | + |
| 6 | +require dirname(__FILE__) . '/app/bootstrap.php'; |
| 7 | +$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER); |
| 8 | + |
| 9 | +class changeConfig extends \Magento\Framework\App\Http |
| 10 | + implements \Magento\Framework\AppInterface { |
| 11 | + public function launch() |
| 12 | + { |
| 13 | + |
| 14 | + $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); |
| 15 | + $appState = $objectManager->get('Magento\Framework\App\State'); |
| 16 | + $field = $appState->emulateAreaCode('adminhtml', function($path){ |
| 17 | + $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER); |
| 18 | + $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); |
| 19 | + $appState = $objectManager->get('Magento\Framework\App\State'); |
| 20 | + $appState->setAreaCode('adminhtml'); |
| 21 | + $field = $objectManager->create('Magento\Config\Model\Config\Structure') |
| 22 | + ->getElementByConfigPath($path); |
| 23 | + return $field; |
| 24 | + }, ['customer/create_account/auto_group_assign']); |
| 25 | + |
| 26 | + echo $field->getData()['source_model']; |
| 27 | + |
| 28 | + return $this->_response; |
| 29 | + } |
| 30 | + |
| 31 | + |
| 32 | +} |
| 33 | + |
| 34 | +/** @var \Magento\Framework\App\Http $app */ |
| 35 | +$app = $bootstrap->createApplication('changeConfig'); |
| 36 | +$bootstrap->run($app); |
0 commit comments