feat(main): Initial Module
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2024 De Websmid BV
|
||||
*
|
||||
* @author Isabelle Oving-Anno | De Websmid BV <isabelle@dewebsmid.nl>
|
||||
* @copyright 2007-2024 De Websmid BV
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
use Websmid\CustomHtml\Module\Install;
|
||||
use Websmid\CustomHtml\Module\AdminHooks;
|
||||
use Websmid\CustomHtml\Module\FrontHooks;
|
||||
use PrestaShop\PrestaShop\Core\Module\WidgetInterface;
|
||||
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (file_exists(__DIR__ . '/vendor/autoload.php')) {
|
||||
require_once __DIR__ . '/vendor/autoload.php';
|
||||
}
|
||||
|
||||
class Ws_CustomHtml extends Module implements WidgetInterface
|
||||
{
|
||||
use Install;
|
||||
use AdminHooks;
|
||||
use FrontHooks;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->name = 'ws_customhtml';
|
||||
$this->version = '1.0.0';
|
||||
$this->author = 'Isabelle Oving-Anno | De Websmid BV';
|
||||
$this->need_instance = 0;
|
||||
$this->bootstrap = true;
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->displayName = $this->trans('Custom HTML', [], 'Modules.Wscustomhtml.Admin');
|
||||
$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