<?php namespace MailPoet\AdminPages\Pages; if (!defined('ABSPATH')) exit; use MailPoet\AdminPages\PageRenderer; use MailPoet\Form\Block; use MailPoet\Models\ModelValidator; use MailPoet\Subscribers\ImportExport\ImportExportFactory; use MailPoet\Util\Installation; class SubscribersImport { /** @var PageRenderer */ private $pageRenderer; /** @var Installation */ private $installation; /** @var Block\Date */ private $dateBlock; public function __construct( PageRenderer $pageRenderer, Installation $installation, Block\Date $dateBlock ) { $this->pageRenderer = $pageRenderer; $this->installation = $installation; $this->dateBlock = $dateBlock; } public function render() { $import = new ImportExportFactory(ImportExportFactory::IMPORT_ACTION); $data = $import->bootstrap(); $data = array_merge($data, [ 'date_types' => $this->dateBlock->getDateTypes(), 'date_formats' => $this->dateBlock->getDateFormats(), 'month_names' => $this->dateBlock->getMonthNames(), 'sub_menu' => 'mailpoet-subscribers', 'role_based_emails' => json_encode(ModelValidator::ROLE_EMAILS), ]); $data['is_new_user'] = $this->installation->isNewInstallation(); $this->pageRenderer->displayPage('subscribers/importExport/import.html', $data); } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
ExperimentalFeatures.php | File | 420 B | 0644 |
|
FormEditor.php | File | 13.31 KB | 0644 |
|
Forms.php | File | 2.2 KB | 0644 |
|
Help.php | File | 1.96 KB | 0644 |
|
Logs.php | File | 1.41 KB | 0644 |
|
MP2Migration.php | File | 730 B | 0644 |
|
NewsletterEditor.php | File | 5.93 KB | 0644 |
|
Newsletters.php | File | 6.84 KB | 0644 |
|
Premium.php | File | 923 B | 0644 |
|
Segments.php | File | 5.42 KB | 0644 |
|
Settings.php | File | 3.48 KB | 0644 |
|
Subscribers.php | File | 3.88 KB | 0644 |
|
SubscribersExport.php | File | 646 B | 0644 |
|
SubscribersImport.php | File | 1.3 KB | 0644 |
|
WelcomeWizard.php | File | 2.15 KB | 0644 |
|
WooCommerceSetup.php | File | 741 B | 0644 |
|
index.php | File | 0 B | 0644 |
|