Magento Internals: Applications and Default Area code

  1. HTTP application ( \Magento\Framework\App\Http ) Entry point for end users. Found in pub/index.php
  2. Media Storage application ( \Magento\MediaStorage\App\Media ) (pub/get.php) This serves images that are not yet on the file system. It can resize images on the fly.
  3. Static Resource application (\Magento\Framework\App\StaticResource ) Entry point for static resources (JS, CSS, etc.). (pub/static.php)
  4. Cron (\Magento\Framework\App\Cron)
  5. Indexers (\Magento\Indexer\App\Indexer)
  1. admin
  2. frontend (Your regular storefront)
  3. Graphql
  4. Webapi
<type name="Magento\Framework\App\AreaList">
<arguments>
<argument name="areas" xsi:type="array">
<item name="pwa" xsi:type="array">
<item name="frontName" xsi:type="string">pwa</item>
</item>
</argument>
</arguments>
</type>
public function getCodeByFrontName($frontName)
{
foreach ($this->_areas as $areaCode => &$areaInfo) {
if (!isset($areaInfo['frontName']) && isset($areaInfo['frontNameResolver'])) {
$resolver = $this->_resolverFactory->create($areaInfo['frontNameResolver']);
$areaInfo['frontName'] = $resolver->getFrontName(true);
}
if (isset($areaInfo['frontName']) && $areaInfo['frontName'] === $frontName) {
return $areaCode;
}
}
return $this->_defaultAreaCode;
}
public function __construct(
\Magento\Framework\ObjectManagerInterface $objectManager,
Area\FrontNameResolverFactory $resolverFactory,
array $areas = [],
$default = null
) {
$this->objectManager = $objectManager;
$this->_resolverFactory = $resolverFactory;
if ($areas) {
$this->_areas = $areas;
}
if ($default) {
$this->_defaultAreaCode = $default;
}
}
<type name="Magento\Framework\App\AreaList">
<arguments>
<argument name="areas" xsi:type="array">
<item name="frontend" xsi:type="array">
<item name="frontName" xsi:type="null" />
<item name="router" xsi:type="string">standard</item>
</item>
</argument>
<argument name="default" xsi:type="string">frontend</argument>
</arguments>
</type>
<type name="Magento\Framework\App\AreaList">
<arguments>
<argument name="default" xsi:type="string">adminhtml</argument>
</arguments>
</type>
TypeError: explode() expects parameter 2 to be string, null given in vendor/magento/framework/App/Router/Base.php:182
'system'=>[
'default'=>[
'web'=>[
'default'=>[
'admin'=>'admin/admin/auth/login'
]
]
]
],
php bin/magento app:config:import

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store