AbstractAutomationEmbed.php
5 months ago
Automation.php
2 years ago
AutomationAnalytics.php
2 months ago
AutomationEditor.php
2 months ago
AutomationFlowEmbed.php
5 months ago
AutomationPreviewEmbed.php
2 months ago
AutomationTemplates.php
2 years ago
CustomFields.php
2 months ago
DynamicSegments.php
2 months ago
ExperimentalFeatures.php
3 years ago
FormEditor.php
1 week ago
Forms.php
2 months ago
Help.php
2 months ago
Homepage.php
2 years ago
Landingpage.php
2 years ago
Logs.php
1 month ago
NewsletterEditor.php
2 months ago
Newsletters.php
2 months ago
Settings.php
5 months ago
StaticSegments.php
2 months ago
Subscribers.php
1 week ago
SubscribersExport.php
3 years ago
SubscribersImport.php
2 months ago
Tags.php
2 months ago
Upgrade.php
1 year ago
WelcomeWizard.php
2 months ago
WooCommerceSetup.php
2 months ago
index.php
3 years ago
Landingpage.php
40 lines
| 1 | <?php declare(strict_types = 1); |
| 2 | |
| 3 | namespace MailPoet\AdminPages\Pages; |
| 4 | |
| 5 | if (!defined('ABSPATH')) exit; |
| 6 | |
| 7 | |
| 8 | use MailPoet\AdminPages\PageRenderer; |
| 9 | use MailPoet\Config\Menu; |
| 10 | use MailPoet\Settings\SettingsController; |
| 11 | use MailPoet\WP\Functions as WPFunctions; |
| 12 | |
| 13 | class Landingpage { |
| 14 | /** @var PageRenderer */ |
| 15 | private $pageRenderer; |
| 16 | |
| 17 | /** @var WPFunctions */ |
| 18 | private $wp; |
| 19 | |
| 20 | private SettingsController $settingsController; |
| 21 | |
| 22 | public function __construct( |
| 23 | PageRenderer $pageRenderer, |
| 24 | WPFunctions $wp, |
| 25 | SettingsController $settingsController |
| 26 | ) { |
| 27 | $this->pageRenderer = $pageRenderer; |
| 28 | $this->wp = $wp; |
| 29 | $this->settingsController = $settingsController; |
| 30 | } |
| 31 | |
| 32 | public function render() { |
| 33 | $data = [ |
| 34 | 'welcome_wizard_url' => $this->wp->adminUrl('admin.php?page=' . Menu::WELCOME_WIZARD_PAGE_SLUG), |
| 35 | 'welcome_wizard_current_step' => $this->settingsController->get('welcome_wizard_current_step', ''), |
| 36 | ]; |
| 37 | $this->pageRenderer->displayPage('landingpage.html', $data); |
| 38 | } |
| 39 | } |
| 40 |