Subida del módulo y tema de PrestaShop

This commit is contained in:
Kaloyan
2026-04-09 18:31:51 +02:00
parent 12c253296f
commit 16b3ff9424
39262 changed files with 7418797 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<?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 version 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.
*
* @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 version 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;

View File

@@ -0,0 +1,15 @@
modules_catalog:
resource: './routes/modules_catalog.yml'
prefix: /mbo/modules/catalog
recommended_modules:
resource: './routes/recommended_modules.yml'
prefix: /mbo/modules/recommended
themes_catalog:
resource: './routes/theme_catalog.yml'
prefix: /mbo/themes/catalog
addons:
resource: './routes/addons.yml'
prefix: /mbo/addons

View File

@@ -0,0 +1,5 @@
admin_mbo_addons_module_upgrade:
path: /modules/upgrade
methods: [ POST ]
defaults:
_controller: 'PrestaShop\Module\Mbo\Controller\Admin\AddonsController::upgradeModuleAction'

View File

@@ -0,0 +1,28 @@
<?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 version 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.
*
* @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 version 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;

View File

@@ -0,0 +1,15 @@
admin_mbo_catalog_module:
path: /
methods: [GET]
defaults:
_controller: 'PrestaShop\Module\Mbo\Controller\Admin\ModuleCatalogController::indexAction'
_legacy_controller: AdminPsMboModule
_legacy_link:
- AdminPsMboModuleParent
- AdminPsMboModule
admin_mbo_module_cdc_error:
path: /cdc_error
methods: [ GET ]
defaults:
_controller: 'PrestaShop\Module\Mbo\Controller\Admin\ModuleCatalogController::cdcErrorAction'

View File

@@ -0,0 +1,7 @@
admin_mbo_recommended_modules:
path: /
methods: [GET]
defaults:
_controller: 'PrestaShop\Module\Mbo\Controller\Admin\ModuleRecommendedController::indexAction'
_legacy_controller: AdminPsMboRecommended
_legacy_link: AdminPsMboRecommended

View File

@@ -0,0 +1,7 @@
admin_mbo_catalog_theme:
path: /
methods: [GET]
defaults:
_controller: 'PrestaShop\Module\Mbo\Controller\Admin\ThemeCatalogController::indexAction'
_legacy_controller: AdminPsMboTheme
_legacy_link: AdminPsMboTheme

View File

@@ -0,0 +1,38 @@
imports:
- { resource: services/*.yml }
- { resource: services/addons.php }
services:
_defaults:
public: true
Symfony\Contracts\Translation\TranslatorInterface: '@PrestaShopBundle\Translation\TranslatorInterface'
PrestaShop\Module\Mbo\Service\ExternalContentProvider\ExternalContentProviderInterface: '@PrestaShop\Module\Mbo\Service\ExternalContentProvider\ExternalContentProvider'
PrestaShop\Module\Mbo\Service\ExternalContentProvider\ExternalContentProvider:
autowire: true
PrestaShop\Module\Mbo\Addons\Provider\LinksProvider:
autowire: true
arguments:
$router: '@prestashop.router'
$categoriesProvider: '@prestashop.categories_provider'
PrestaShop\Module\Mbo\Controller\Admin\ModuleCatalogController:
autowire: true
autoconfigure: true
PrestaShop\Module\Mbo\Controller\Admin\ModuleSelectionController:
autowire: true
PrestaShop\Module\Mbo\Controller\Admin\ModuleRecommendedController:
autowire: true
autoconfigure: true
PrestaShop\Module\Mbo\Controller\Admin\ThemeCatalogController:
autowire: true
autoconfigure: true
PrestaShop\Module\Mbo\Controller\Admin\AddonsController:
autowire: true

View File

@@ -0,0 +1,17 @@
services:
_defaults:
public: true
PrestaShop\PsAccountsInstaller\Installer\Installer:
autowire: true
arguments:
$psAccountsVersion: "7.1.2"
PrestaShop\PsAccountsInstaller\Installer\Facade\PsAccounts:
autowire: true
PrestaShop\Module\Mbo\Accounts\Provider\AccountsDataProvider:
autowire: true
autoconfigure: true
arguments:
$psAccountsVersion: "7.1.2"

View File

@@ -0,0 +1,40 @@
<?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 version 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.
*
* @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 version 3.0
*/
declare(strict_types=1);
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
use PrestaShop\Module\Mbo\Addons\Subscriber\ModuleManagementEventSubscriber;
if (!defined('_PS_VERSION_')) {
exit;
}
return static function (ContainerConfigurator $container) {
$services = $container->services();
// Only load event subscriber when module is enabled to avoid logging events if disabled
if (\ps_mbo::checkModuleStatus()) {
$services->set(ModuleManagementEventSubscriber::class)
->autowire()
->public()
->tag('kernel.event_subscriber');
}
};

View File

@@ -0,0 +1,34 @@
services:
_defaults:
public: true
PrestaShop\Module\Mbo\Addons\User\AddonsUser:
autowire: true
autoconfigure: true
PrestaShop\Module\Mbo\Addons\User\AddonsUserProvider:
autowire: true
autoconfigure: true
PrestaShop\Module\Mbo\Addons\Provider\AddonsDataProvider:
autowire: true
properties:
cacheDir: "%kernel.cache_dir%"
# Addons API Client
PrestaShop\Module\Mbo\Addons\ApiClient:
autowire: true
arguments:
$apiUrl: "%env(ADDONS_API_URL)%"
$httpClient: '@Psr\Http\Client\ClientInterface'
$requestFactory: '@Psr\Http\Message\ServerRequestFactoryInterface'
calls:
- method: setDefaultParams
arguments:
- "@=service('translator').getLocale()"
- "@=service('prestashop.adapter.data_provider.country').getIsoCodebyId()"
- "@=service('prestashop.adapter.legacy.configuration').get('_PS_BASE_URL_')"
- "@=service('prestashop.core.foundation.version').getSemVersion()"
PrestaShop\Module\Mbo\Addons\Toolbar:
autowire: true

View File

@@ -0,0 +1,33 @@
imports:
- { resource: api/repository.yml }
services:
_defaults:
public: true
ps_mbo.db:
class: Db
factory: [ 'Db', 'getInstance' ]
ps_mbo:
class: 'ps_mbo'
factory: [ 'Module', 'getInstanceByName' ]
arguments:
- 'ps_mbo'
PrestaShop\Module\Mbo\Api\Config\Env:
autowire: true
PrestaShop\Module\Mbo\Api\Service\ModuleTransitionExecutor:
autowire: true
PrestaShop\Module\Mbo\Api\Service\ConfigApplyExecutor:
autowire: true
PrestaShop\Module\Mbo\Api\Service\Factory:
autowire: true
arguments:
- [
'@PrestaShop\Module\Mbo\Api\Service\ModuleTransitionExecutor',
'@PrestaShop\Module\Mbo\Api\Service\ConfigApplyExecutor'
]

View File

@@ -0,0 +1,30 @@
services:
_defaults:
public: true
PrestaShop\Module\Mbo\Distribution\Config\Factory:
autowire: true
PrestaShop\Module\Mbo\Distribution\Config\Applier:
autowire: true
PrestaShop\Module\Mbo\Distribution\Config\Appliers\ThemeCatalogMenuConfigApplier:
autowire: true
PrestaShop\Module\Mbo\Distribution\Config\Appliers\ModuleSelectionMenuConfigApplier:
autowire: true
PrestaShop\Module\Mbo\Distribution\Config\Appliers\Factory:
autowire: true
arguments:
- [
'@PrestaShop\Module\Mbo\Distribution\Config\Appliers\ThemeCatalogMenuConfigApplier',
'@PrestaShop\Module\Mbo\Distribution\Config\Appliers\ModuleSelectionMenuConfigApplier'
]
PrestaShop\Module\Mbo\Distribution\Config\CommandHandler\ConfigChangeCommandHandler:
autowire: true
PrestaShop\Module\Mbo\Distribution\Config\CommandHandler\VersionChangeApplyConfigCommandHandler:
autowire: true

View File

@@ -0,0 +1,28 @@
<?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 version 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.
*
* @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 version 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;

View File

@@ -0,0 +1,26 @@
services:
_defaults:
public: true
PrestaShop\Module\Mbo\Module\SourceRetriever\AddonsUrlSourceRetriever:
autowire: true
arguments:
$addonsDataProvider: '@PrestaShop\Module\Mbo\Addons\Provider\AddonsDataProvider'
$translator: '@translator'
$httpClient: '@Psr\Http\Client\ClientInterface'
$requestFactory: '@Psr\Http\Message\ServerRequestFactoryInterface'
$configuration: '@PrestaShop\PrestaShop\Core\ConfigurationInterface'
properties:
cacheDir: "%kernel.cache_dir%"
PrestaShop\Module\Mbo\Module\Workflow\TransitionsManager:
autowire: true
PrestaShop\Module\Mbo\Module\Workflow\TransitionBuilder:
autowire: true
PrestaShop\Module\Mbo\Module\Workflow\TransitionApplier:
autowire: true
PrestaShop\Module\Mbo\Module\CommandHandler\ModuleStatusTransitionCommandHandler:
autowire: true

View File

@@ -0,0 +1,6 @@
services:
_defaults:
public: true
PrestaShop\Module\Mbo\Api\Repository\ModuleRepository:
autowire: true

View File

@@ -0,0 +1,4 @@
imports:
- { resource: modules.yml }
- { resource: api/modules.yml }
- { resource: api/distribution.yml }

View File

@@ -0,0 +1,12 @@
services:
_defaults:
public: true
PrestaShop\Module\Mbo\Service\View\ContextBuilder:
autowire: true
arguments:
$router: '@prestashop.router'
$cacheProvider: '@Doctrine\Common\Cache\Psr6\DoctrineProvider'
mbo.cdc.context_builder:
alias: PrestaShop\Module\Mbo\Service\View\ContextBuilder

View File

@@ -0,0 +1,40 @@
parameters:
ps_cache_dir: !php/const _PS_CACHE_DIR_
services:
_defaults:
public: true
mbo_doctrine_cache_provider: '@Doctrine\Common\Cache\Psr6\DoctrineProvider'
Symfony\Component\Cache\Adapter\FilesystemAdapter:
autowire: true
arguments:
$namespace: ''
$defaultLifetime: 0
$directory: "%ps_cache_dir%%/ps_mbo"
Doctrine\Common\Cache\Psr6\DoctrineProvider:
autowire: true
autoconfigure: true
factory: [ Doctrine\Common\Cache\Psr6\DoctrineProvider, wrap ]
arguments:
$pool: '@Symfony\Component\Cache\Adapter\FilesystemAdapter'
# Distribution API Client
PrestaShop\Module\Mbo\Distribution\Client:
autowire: true
arguments:
$apiUrl: "%env(DISTRIBUTION_API_URL)%"
$httpClient: '@Psr\Http\Client\ClientInterface'
$requestFactory: '@Psr\Http\Message\ServerRequestFactoryInterface'
$cacheProvider: '@Doctrine\Common\Cache\Psr6\DoctrineProvider'
# Distribution API Client with addons user
PrestaShop\Module\Mbo\Distribution\ConnectedClient:
autowire: true
arguments:
$apiUrl: "%env(DISTRIBUTION_API_URL)%"
$httpClient: '@Psr\Http\Client\ClientInterface'
$requestFactory: '@Psr\Http\Message\ServerRequestFactoryInterface'
$cacheProvider: '@Doctrine\Common\Cache\Psr6\DoctrineProvider'

View File

@@ -0,0 +1,9 @@
services:
_defaults:
public: true
PrestaShop\Module\Mbo\Handler\ErrorHandler\ErrorHandlerInterface: '@PrestaShop\Module\Mbo\Handler\ErrorHandler\ErrorHandler'
PrestaShop\Module\Mbo\Handler\ErrorHandler\ErrorHandler:
class: PrestaShop\Module\Mbo\Handler\ErrorHandler\ErrorHandler

View File

@@ -0,0 +1,28 @@
<?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 version 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.
*
* @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 version 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;

View File

@@ -0,0 +1,48 @@
---
services:
_defaults:
public: true
PrestaShop\Module\Mbo\Module\Repository:
autowire: true
arguments:
$cacheProvider: '@Doctrine\Common\Cache\Psr6\DoctrineProvider'
$localeCode: "@=service('translator').getLocale()"
$dbPrefix: "@=service('prestashop.adapter.legacy.configuration').get('_DB_PREFIX_')"
PrestaShop\Module\Mbo\Module\FiltersFactory:
autowire: true
PrestaShop\Module\Mbo\Module\CollectionFactory:
autowire: true
PrestaShop\Module\Mbo\Module\ModuleBuilder:
autowire: true
arguments:
$moduleDirectory: "@=service('prestashop.adapter.legacy.configuration').get('_PS_MODULE_DIR_')"
$router: '@prestashop.router'
PrestaShop\Module\Mbo\Module\FilesManager:
autowire: true
PrestaShop\Module\Mbo\Module\ActionsManager:
autowire: true
mbo.modules.actions_manager:
alias: PrestaShop\Module\Mbo\Module\ActionsManager
PrestaShop\Module\Mbo\Module\SourceHandler\AddonsUrlSourceHandler:
autowire: true
autoconfigure: true
tags: [ core.module.source_handler ]
PrestaShop\Module\Mbo\Service\ModulesHelper:
autowire: true
arguments:
$router: '@prestashop.router'
PrestaShop\Module\Mbo\Service\HookExceptionHolder:
autowire: true
mbo.hook_exception_holder:
alias: PrestaShop\Module\Mbo\Service\HookExceptionHolder

View File

@@ -0,0 +1,20 @@
services:
_defaults:
public: true
# security.authorization_checker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
PrestaShop\Module\Mbo\Api\Security\AdminAuthenticationProvider:
autowire: true
arguments:
$cacheProvider: '@Doctrine\Common\Cache\Psr6\DoctrineProvider'
PrestaShop\Module\Mbo\Api\Security\AuthorizationChecker:
autowire: true
arguments:
$cacheProvider: '@Doctrine\Common\Cache\Psr6\DoctrineProvider'
PrestaShop\Module\Mbo\Security\PermissionCheckerInterface: '@PrestaShop\Module\Mbo\Security\PermissionChecker'
PrestaShop\Module\Mbo\Security\PermissionChecker:
autowire: true

View File