Skip to content

Commit

Permalink
fix: bug with presenter
Browse files Browse the repository at this point in the history
  • Loading branch information
fox-john committed Dec 1, 2023
1 parent 4cdfbd9 commit 7e1003a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ps_eventbus.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Ps_eventbus extends Module
/**
* @var string
*/
const VERSION = '0.0.0';
const VERSION = '2.3.2';

/**
* @var array
Expand Down Expand Up @@ -144,7 +144,7 @@ public function __construct()
$this->author = 'PrestaShop';
$this->need_instance = 0;
$this->bootstrap = true;
$this->version = '0.0.0';
$this->version = '2.3.2';
$this->module_key = '7d76e08a13331c6c393755886ec8d5ce';

parent::__construct();
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Admin/PsEventbusResolverController.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
use Prestashop\ModuleLibMboInstaller\Installer as MBOInstaller;
use Symfony\Component\HttpFoundation\JsonResponse;

class MetricsResolverController extends FrameworkBundleAdminController
class PsEventbusResolverController extends FrameworkBundleAdminController
{
/** @var Ps_eventbus */
private $module;
Expand Down
6 changes: 3 additions & 3 deletions src/Helper/ModuleHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function getInstallLink(string $moduleName)
return '';
}
/** @var Router $router * */
$router = $this->module->getService('router');
$router = $this->module->get('router');

if ($moduleName === 'ps_mbo') {
return substr(\Tools::getShopDomainSsl(true) . __PS_BASE_URI__, 0, -1) .
Expand Down Expand Up @@ -88,7 +88,7 @@ public function getEnableLink(string $moduleName)
}

/** @var Router $router * */
$router = $this->module->getService('router');
$router = $this->module->get('router');

return substr(\Tools::getShopDomainSsl(true) . __PS_BASE_URI__, 0, -1) .
$router->generate('admin_module_manage_action', [
Expand All @@ -107,7 +107,7 @@ public function getEnableLink(string $moduleName)
public function getUpdateLink(string $moduleName)
{
/** @var Router $router * */
$router = $this->module->getService('router');
$router = $this->module->get('router');

return substr(\Tools::getShopDomainSsl(true) . __PS_BASE_URI__, 0, -1) .
$router->generate('admin_module_manage_action', [
Expand Down
11 changes: 11 additions & 0 deletions src/Service/PresenterService.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,17 @@ public function expose(\ModuleCore $module, $requiredConsents = [], $optionalCon
throw new \PrestaShopException('No language context');
}

$moduleInformations = [
'ps_eventbus' => $moduleHelper->buildModuleInformations(
'ps_eventbus'
),
'ps_mbo' => $moduleHelper->buildModuleInformations(
'ps_mbo'
),
];
dump($moduleInformations);
die;

return [

Check failure on line 110 in src/Service/PresenterService.php

View workflow job for this annotation

GitHub Actions / PHPStan (1.7.8.10)

Unreachable statement - code above always terminates.

Check failure on line 110 in src/Service/PresenterService.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1.1)

Unreachable statement - code above always terminates.
'jwt' => $this->psAccountsService->getOrRefreshToken(),
'requiredConsents' => $requiredConsents,
Expand Down

0 comments on commit 7e1003a

Please sign in to comment.