-
-
Save jonatanaxe/6463e9ba9e6d848d9934d1f391d82b12 to your computer and use it in GitHub Desktop.
Magento 2 custom script boilerplate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require __DIR__ . '/app/bootstrap.php'; | |
| $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER); | |
| $objectManager = $bootstrap->getObjectManager(); | |
| $objectManager->get('\Magento\Framework\App\State')->setAreaCode('adminhtml'); | |
| $registry = $objectManager->get('\Magento\Framework\Registry'); | |
| $registry->register('isSecureArea', 'true'); | |
| #################################################################################################### | |
| ## BEGIN | |
| #################################################################################################### | |
| ## END | |
| $registry->unregister('isSecureArea'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment