feat(main): conform to Websmid module standards
This commit is contained in:
@@ -2,10 +2,17 @@
|
||||
|
||||
namespace Websmid\CustomHtml\Module;
|
||||
|
||||
use Tools;
|
||||
|
||||
trait AdminHooks
|
||||
{
|
||||
public function isUsingNewTranslationSystem(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getContent()
|
||||
{
|
||||
Tools::redirectAdmin($this->get('router')->generate('customhtml_index'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace Websmid\CustomHtml\Module;
|
||||
use Websmid\CustomHtml\Model\CustomHtml;
|
||||
use Context;
|
||||
|
||||
trait FrontHooks
|
||||
trait DisplayHooks
|
||||
{
|
||||
public function renderWidget($hookName = null, array $configuration = [])
|
||||
{
|
||||
+2
-7
@@ -9,7 +9,7 @@
|
||||
|
||||
use Websmid\CustomHtml\Module\Install;
|
||||
use Websmid\CustomHtml\Module\AdminHooks;
|
||||
use Websmid\CustomHtml\Module\FrontHooks;
|
||||
use Websmid\CustomHtml\Module\DisplayHooks;
|
||||
use PrestaShop\PrestaShop\Core\Module\WidgetInterface;
|
||||
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
@@ -24,7 +24,7 @@ class Ws_CustomHtml extends Module implements WidgetInterface
|
||||
{
|
||||
use Install;
|
||||
use AdminHooks;
|
||||
use FrontHooks;
|
||||
use DisplayHooks;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@@ -40,9 +40,4 @@ class Ws_CustomHtml extends Module implements WidgetInterface
|
||||
$this->description = $this->trans('Create and manage custom HTML blocks for frontend hooks.', [], 'Modules.Wscustomhtml.Admin');
|
||||
$this->ps_versions_compliancy = ['min' => '1.7.0.0', 'max' => _PS_VERSION_];
|
||||
}
|
||||
|
||||
public function getContent()
|
||||
{
|
||||
Tools::redirectAdmin($this->get('router')->generate('customhtml_index'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user