installer = $installer; if (null === $context) { $context = \Context::getContext(); } $this->context = $context; } /** * @return array * * @throws \Exception */ public function present() { // Fallback minimal Presenter return [ 'psIs17' => $this->installer->isShopVersion17(), 'psAccountsInstallLink' => $this->installer->getInstallLink(), 'psAccountsEnableLink' => $this->installer->getEnableLink(), 'psAccountsUpdateLink' => $this->installer->getUpgradeLink(), 'psAccountsIsInstalled' => $this->installer->isModuleInstalled(), 'psAccountsIsEnabled' => $this->installer->isModuleEnabled(), 'psAccountsIsUptodate' => $this->installer->checkModuleVersion(), 'onboardingLink' => null, 'user' => [ 'email' => null, 'emailIsValidated' => false, 'isSuperAdmin' => $this->isEmployeeSuperAdmin(), ], 'currentShop' => null, 'shops' => [], 'superAdminEmail' => null, 'ssoResendVerificationEmail' => null, 'manageAccountLink' => null, ]; } /** * @return bool */ public function isEmployeeSuperAdmin() { return $this->context->employee->isSuperAdmin(); } }