Project init

This commit is contained in:
2026-02-09 11:39:50 +01:00
parent b88d2b8abc
commit 835aabc531
11 changed files with 184 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
vendor/

29
composer.json Normal file
View File

@@ -0,0 +1,29 @@
{
"name": "dewebsmid/ws_faqaccordion",
"description": "Displays your info as a FAQ accordion.",
"authors": [
{
"name": "Isabelle Oving-Anno",
"email": "isabelle@dewebsmid.nl"
}
],
"require": {
"php": ">=8.2.0"
},
"autoload": {
"psr-4": {
"WsfaqAccordion\\": "src/"
},
"classmap": [
"ws_faqAccordion.php"
],
"exclude-from-classmap": []
},
"config": {
"preferred-install": "dist",
"prepend-autoloader": false
},
"type": "prestashop-module",
"author": "Isabelle Oving-Anno",
"license": "AFL-3.0"
}

20
composer.lock generated Normal file
View File

@@ -0,0 +1,20 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "14a8801fe935c090041cfc25afe6829f",
"packages": [],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": ">=8.2.0"
},
"platform-dev": {},
"plugin-api-version": "2.6.0"
}

0
config/services.yml Normal file
View File

11
config_nl.xml Normal file
View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>ws_faqAccordion</name>
<displayName><![CDATA[FAQ Accordion]]></displayName>
<version><![CDATA[1.0.0]]></version>
<description><![CDATA[Displays your info as a FAQ accordion]]></description>
<author><![CDATA[Isabelle Oving-Anno | De Websmid b.v.]]></author>
<tab><![CDATA[other]]></tab>
<is_configurable>0</is_configurable>
<need_instance>0</need_instance>
</module>

35
index.php Normal file
View File

@@ -0,0 +1,35 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

BIN
logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

12
src/Module/Install.php Normal file
View File

@@ -0,0 +1,12 @@
<?php
namespace WsfaqAccordion\Module;
trait Install
{
public function install()
{
return parent::install()
&& $this->registerHook('displayHomeAccordion');
}
}

View File

@@ -0,0 +1,14 @@
<?php
namespace WsfaqAccordion\Module;
trait displayHooks
{
public function hookDisplayHomeAccordion($params)
{
$message = 'Hello World! This is the ws_faqAccordion module.';
$this->context->smarty->assign('message', $message);
return $this->fetch('module:ws_faqAccordion/views/templates/front/hello.tpl');
}
}

View File

@@ -0,0 +1,2 @@
<h1>{$message}</h1>

59
ws_faqAccordion.php Normal file
View File

@@ -0,0 +1,59 @@
<?php
/**
* 2007-2026 De Websmid BV
*
* NOTICE OF LICENSE
*
* This file is not open source! Each license that you purchased is only available for 1 wesite only.
* If you want to use this file on more websites (or projects), you need to purchase additional licenses.
* You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please contact us for extra customization service at an affordable price
*
* @author De Websmid BV <info@dewebsmid.nl>
* @copyright 2007-2026 De Websmid BV
* @license Valid for 1 website (or project) for each purchase of license
* International Registered Trademark & Property of De Websmid BV
*/
use WsFaqAccordion\Module\Install;
use WsFaqAccordion\Module\displayHooks;
if (!defined('_PS_VERSION_')) {
exit;
}
if (file_exists(__DIR__ . '/vendor/autoload.php')) {
require_once __DIR__ . '/vendor/autoload.php';
}
class ws_faqAccordion extends Module
{
use Install;
use displayHooks;
public function __construct()
{
$this->name = 'ws_faqAccordion';
$this->tab = 'other';
$this->version = '1.0.0';
$this->author = 'Isabelle Oving-Anno | De Websmid b.v.';
$this->need_instance = 0;
$this->ps_versions_compliancy = [
'min' => '1.7.0',
'max' => '9.99.99',
];
$this -> bootstrap = true;
parent::__construct();
$this->displayName = $this->l('FAQ Accordion');
$this->description = $this->l('Displays your info as a FAQ accordion');
}
}