align Smarty template registration

This commit is contained in:
Daniel Seifert 2024-05-31 16:31:25 +02:00
parent 46aeb7e6bd
commit ab3c6e20a6
23 changed files with 107 additions and 28 deletions

View File

@ -19,11 +19,12 @@ declare(strict_types=1);
namespace D3\MailConfigChecker\Application\Controller\Admin; namespace D3\MailConfigChecker\Application\Controller\Admin;
use D3\MailConfigChecker\Application\Model\Constants;
use OxidEsales\Eshop\Application\Controller\Admin\AdminController; use OxidEsales\Eshop\Application\Controller\Admin\AdminController;
class MailCheckBase extends AdminController class MailCheckBase extends AdminController
{ {
protected $_sThisTemplate = 'mailCheckBase.tpl'; protected $_sThisTemplate = '@'.Constants::OXID_MODULE_ID.'/admin/mailCheckBase';
/** /**
* @return string * @return string

View File

@ -19,11 +19,12 @@ declare(strict_types=1);
namespace D3\MailConfigChecker\Application\Controller\Admin; namespace D3\MailConfigChecker\Application\Controller\Admin;
use D3\MailConfigChecker\Application\Model\Constants;
use OxidEsales\Eshop\Application\Controller\Admin\AdminListController; use OxidEsales\Eshop\Application\Controller\Admin\AdminListController;
class MailCheckMenu extends AdminListController class MailCheckMenu extends AdminListController
{ {
protected $_sThisTemplate = 'mailCheckMenu.tpl'; protected $_sThisTemplate = '@'.Constants::OXID_MODULE_ID.'/admin/mailCheckMenu';
public function render() public function render()
{ {

View File

@ -17,6 +17,7 @@ namespace D3\MailConfigChecker\Application\Controller\Admin;
use Assert\Assert; use Assert\Assert;
use Assert\InvalidArgumentException; use Assert\InvalidArgumentException;
use D3\MailConfigChecker\Application\Model\Constants;
use D3\MailConfigChecker\Application\Model\Exception\d3TranslatableLazyAssertionException; use D3\MailConfigChecker\Application\Model\Exception\d3TranslatableLazyAssertionException;
use Exception; use Exception;
use OxidEsales\Eshop\Application\Controller\Admin\AdminDetailsController; use OxidEsales\Eshop\Application\Controller\Admin\AdminDetailsController;
@ -26,7 +27,7 @@ use OxidEsales\Eshop\Core\Registry;
class MailConfigCheck extends AdminDetailsController class MailConfigCheck extends AdminDetailsController
{ {
protected $_sThisTemplate = 'mailConfigCheck.tpl'; protected $_sThisTemplate = '@'.Constants::OXID_MODULE_ID.'/admin/mailConfigCheck';
protected $testMailAddress = 'test@example.com'; protected $testMailAddress = 'test@example.com';
public function render() public function render()

View File

@ -15,9 +15,10 @@
namespace D3\MailConfigChecker\Application\Controller\Admin; namespace D3\MailConfigChecker\Application\Controller\Admin;
use D3\MailConfigChecker\Application\Model\Constants;
use OxidEsales\Eshop\Application\Controller\Admin\AdminDetailsController; use OxidEsales\Eshop\Application\Controller\Admin\AdminDetailsController;
class MailInfoPage extends AdminDetailsController class MailInfoPage extends AdminDetailsController
{ {
protected $_sThisTemplate = 'mailInfoPage.tpl'; protected $_sThisTemplate = '@'.Constants::OXID_MODULE_ID.'/admin/mailInfoPage';
} }

View File

@ -16,6 +16,7 @@
namespace D3\MailConfigChecker\Application\Controller\Admin; namespace D3\MailConfigChecker\Application\Controller\Admin;
use Assert\Assert; use Assert\Assert;
use D3\MailConfigChecker\Application\Model\Constants;
use D3\MailConfigChecker\Application\Model\Exception\d3TranslatableLazyAssertionException; use D3\MailConfigChecker\Application\Model\Exception\d3TranslatableLazyAssertionException;
use OxidEsales\Eshop\Application\Controller\Admin\AdminDetailsController; use OxidEsales\Eshop\Application\Controller\Admin\AdminDetailsController;
use OxidEsales\Eshop\Application\Model\Shop; use OxidEsales\Eshop\Application\Model\Shop;
@ -24,7 +25,7 @@ use OxidEsales\Eshop\Core\Registry;
class MailTester extends AdminDetailsController class MailTester extends AdminDetailsController
{ {
protected $_sThisTemplate = 'mailTester.tpl'; protected $_sThisTemplate = '@'.Constants::OXID_MODULE_ID.'/admin/mailTester';
public function sendMail() public function sendMail()
{ {

View File

@ -17,6 +17,7 @@ namespace D3\MailConfigChecker\Application\Controller\Admin;
use Assert\Assert; use Assert\Assert;
use Assert\InvalidArgumentException; use Assert\InvalidArgumentException;
use D3\MailConfigChecker\Application\Model\Constants;
use Net_SMTP; use Net_SMTP;
use OxidEsales\Eshop\Application\Controller\Admin\AdminDetailsController; use OxidEsales\Eshop\Application\Controller\Admin\AdminDetailsController;
use OxidEsales\Eshop\Application\Model\Shop; use OxidEsales\Eshop\Application\Model\Shop;
@ -70,7 +71,7 @@ class SmtpChecker extends AdminDetailsController
public function getTemplateName() public function getTemplateName()
{ {
return 'smtpCheck.tpl'; return '@'.Constants::OXID_MODULE_ID.'/admin/smtpCheck';
} }
public function render() public function render()

View File

@ -16,6 +16,7 @@ declare(strict_types=1);
namespace D3\MailConfigChecker\Application\Controller\Admin; namespace D3\MailConfigChecker\Application\Controller\Admin;
use Assert\InvalidArgumentException; use Assert\InvalidArgumentException;
use D3\MailConfigChecker\Application\Model\Constants;
use D3\MailConfigChecker\Application\Model\SpfResult; use D3\MailConfigChecker\Application\Model\SpfResult;
use Mika56\SPFCheck\DNS\DNSRecordGetter; use Mika56\SPFCheck\DNS\DNSRecordGetter;
use Mika56\SPFCheck\Model\Query; use Mika56\SPFCheck\Model\Query;
@ -27,7 +28,7 @@ use OxidEsales\Eshop\Core\Registry;
class SpfChecker extends AdminDetailsController class SpfChecker extends AdminDetailsController
{ {
protected $_sThisTemplate = 'spfCheck.tpl'; protected $_sThisTemplate = '@'.Constants::OXID_MODULE_ID.'/admin/spfCheck';
public function render() public function render()
{ {

View File

@ -0,0 +1,8 @@
<?php
namespace D3\MailConfigChecker\Application\Model;
class Constants
{
public const OXID_MODULE_ID = 'd3mailconfigchecker';
}

View File

@ -1,3 +0,0 @@
<?php
$aLang = include __DIR__."/../../de/translations.php";

View File

@ -1,3 +0,0 @@
<?php
$aLang = include __DIR__."/../../en/translations.php";

View File

@ -0,0 +1,22 @@
<?php
/**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
// @codeCoverageIgnoreStart
$sLangName = 'Deutsch';
$aLang = include __DIR__."/../../de/translations.php";
// @codeCoverageIgnoreEnd

View File

@ -0,0 +1,22 @@
<?php
/**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
// @codeCoverageIgnoreStart
$sLangName = 'English';
$aLang = include __DIR__."/../../en/translations.php";
// @codeCoverageIgnoreEnd

View File

@ -1,5 +1,18 @@
<?php <?php
/**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
return [ return [
'charset' => 'UTF-8', 'charset' => 'UTF-8',
'D3_MENU_MAILCHECKER' => 'E-Mail Prüfung', 'D3_MENU_MAILCHECKER' => 'E-Mail Prüfung',

View File

@ -1,5 +1,18 @@
<?php <?php
/**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
return [ return [
"charset" => "UTF-8", "charset" => "UTF-8",
"D3_MENU_MAILCHECKER" => "Email checking", "D3_MENU_MAILCHECKER" => "Email checking",

View File

@ -20,17 +20,17 @@ use D3\MailConfigChecker\Application\Controller\Admin\MailInfoPage;
use D3\MailConfigChecker\Application\Controller\Admin\MailTester; use D3\MailConfigChecker\Application\Controller\Admin\MailTester;
use D3\MailConfigChecker\Application\Controller\Admin\SpfChecker; use D3\MailConfigChecker\Application\Controller\Admin\SpfChecker;
use D3\MailConfigChecker\Application\Controller\Admin\SmtpChecker; use D3\MailConfigChecker\Application\Controller\Admin\SmtpChecker;
use D3\MailConfigChecker\Application\Model\Constants;
$sMetadataVersion = '2.1'; $sMetadataVersion = '2.1';
$sModuleId = 'd3mailconfigchecker';
$logo = '<img src="https://logos.oxidmodule.com/d3logo.svg" alt="(D3)" style="height:1em;width:1em">'; $logo = '<img src="https://logos.oxidmodule.com/d3logo.svg" alt="(D3)" style="height:1em;width:1em">';
/** /**
* Module information * Module information
*/ */
$aModule = [ $aModule = [
'id' => $sModuleId, 'id' => Constants::OXID_MODULE_ID,
'title' => [ 'title' => [
'de' => $logo.' E-Mail Konfigurationspr&uuml;fung', 'de' => $logo.' E-Mail Konfigurationspr&uuml;fung',
'en' => $logo.' Mail Configuration Check Tool', 'en' => $logo.' Mail Configuration Check Tool',
@ -54,13 +54,13 @@ $aModule = [
'd3mailtester' => MailTester::class, 'd3mailtester' => MailTester::class,
], ],
'templates' => [ 'templates' => [
'mailCheckBase.tpl' => 'd3/mailconfigchecker/Application/views/admin/tpl/mailcheckbase.tpl', '@' . Constants::OXID_MODULE_ID . '/admin/mailCheckBase.tpl' => 'views/smarty/admin/mailcheckbase.tpl',
'mailCheckMenu.tpl' => 'd3/mailconfigchecker/Application/views/admin/tpl/mailcheckmenu.tpl', '@' . Constants::OXID_MODULE_ID . '/admin/mailCheckMenu.tpl' => 'views/smarty/admin/mailcheckmenu.tpl',
'mailInfoPage.tpl' => 'd3/mailconfigchecker/Application/views/admin/tpl/mailinfopage.tpl', '@' . Constants::OXID_MODULE_ID . '/admin/mailInfoPage.tpl' => 'views/smarty/admin/mailinfopage.tpl',
'mailConfigCheck.tpl' => 'd3/mailconfigchecker/Application/views/admin/tpl/mailconfigcheck.tpl', '@' . Constants::OXID_MODULE_ID . '/admin/mailConfigCheck.tpl' => 'views/smarty/admin/mailconfigcheck.tpl',
'smtpCheck.tpl' => 'd3/mailconfigchecker/Application/views/admin/tpl/smtpCheck.tpl', '@' . Constants::OXID_MODULE_ID . '/admin/smtpCheck.tpl' => 'views/smarty/admin/smtpCheck.tpl',
'spfCheck.tpl' => 'd3/mailconfigchecker/Application/views/admin/tpl/spfCheck.tpl', '@' . Constants::OXID_MODULE_ID . '/admin/spfCheck.tpl' => 'views/smarty/admin/spfCheck.tpl',
'mailTester.tpl' => 'd3/mailconfigchecker/Application/views/admin/tpl/mailTester.tpl', '@' . Constants::OXID_MODULE_ID . '/admin/mailTester.tpl' => 'views/smarty/admin/mailTester.tpl',
'inc_bootstrap.tpl' => 'd3/mailconfigchecker/Application/views/admin/tpl/inc/bootstrap.tpl', '@' . Constants::OXID_MODULE_ID . '/admin/inc_bootstrap.tpl' => 'views/smarty/admin/inc/bootstrap.tpl',
], ],
]; ];

View File

@ -1,5 +1,5 @@
[{include file="headitem.tpl" title="d3mxd3cleartmp"|oxmultilangassign}] [{include file="headitem.tpl" title="d3mxd3cleartmp"|oxmultilangassign}]
[{include file="inc_bootstrap.tpl"}] [{include file="@d3mailconfigchecker/admin/inc_bootstrap"}]
[{if $readonly}] [{if $readonly}]
[{assign var="readonly" value="readonly disabled"}] [{assign var="readonly" value="readonly disabled"}]

View File

@ -1,5 +1,5 @@
[{include file="headitem.tpl" title="d3mxd3cleartmp"|oxmultilangassign}] [{include file="headitem.tpl" title="d3mxd3cleartmp"|oxmultilangassign}]
[{include file="inc_bootstrap.tpl"}] [{include file="@d3mailconfigchecker/admin/inc_bootstrap"}]
<style> <style>
span.btn { span.btn {

View File

@ -1,5 +1,5 @@
[{include file="headitem.tpl" title="d3mxd3cleartmp"|oxmultilangassign}] [{include file="headitem.tpl" title="d3mxd3cleartmp"|oxmultilangassign}]
[{include file="inc_bootstrap.tpl"}] [{include file="@d3mailconfigchecker/admin/inc_bootstrap"}]
<style> <style>
span.btn { span.btn {

View File

@ -1,5 +1,5 @@
[{include file="headitem.tpl" title="GENERAL_ADMIN_TITLE"|oxmultilangassign}] [{include file="headitem.tpl" title="GENERAL_ADMIN_TITLE"|oxmultilangassign}]
[{include file="inc_bootstrap.tpl"}] [{include file="@d3mailconfigchecker/admin/inc_bootstrap"}]
<style> <style>
.communicationoutput, .communicationoutput,

View File

@ -1,5 +1,5 @@
[{include file="headitem.tpl" title="GENERAL_ADMIN_TITLE"|oxmultilangassign}] [{include file="headitem.tpl" title="GENERAL_ADMIN_TITLE"|oxmultilangassign}]
[{include file="inc_bootstrap.tpl"}] [{include file="@d3mailconfigchecker/admin/inc_bootstrap"}]
<form name="transfer" id="transfer" action="[{$oViewConf->getSelfLink()}]" method="post"> <form name="transfer" id="transfer" action="[{$oViewConf->getSelfLink()}]" method="post">
[{$oViewConf->getHiddenSid()}] [{$oViewConf->getHiddenSid()}]