Store views, Globalmaps - Confirmed Loading

This commit is contained in:
2026-03-20 21:59:38 -05:00
parent db97652bc2
commit 6b73c6f781
27 changed files with 2770 additions and 5 deletions
+43
View File
@@ -0,0 +1,43 @@
<?php
declare(strict_types=1);
namespace MageSail\Magesail\Block\Adminhtml\Nginx;
use Magento\Backend\Block\Template;
use Magento\Backend\Block\Template\Context;
use MageSail\Magesail\Model\NginxGlobalMapManager;
class Map extends Template
{
public function __construct(
Context $context,
private readonly NginxGlobalMapManager $nginxMapManager,
array $data = []
) {
parent::__construct($context, $data);
}
public function getMapFilePath(): ?string
{
return $this->nginxMapManager->getMapFilePath();
}
public function getMapContent(): string
{
try {
return $this->nginxMapManager->readMapFile();
} catch (\Exception) {
return '';
}
}
public function getMapUrl(): string
{
return $this->getUrl('*/*/map');
}
public function getFormKey(): string
{
return $this->formKey->getFormKey();
}
}