Add automation editor page
[MAILPOET-4287]
This commit is contained in:
32
mailpoet/lib/AdminPages/Pages/AutomationEditor.php
Normal file
32
mailpoet/lib/AdminPages/Pages/AutomationEditor.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace MailPoet\AdminPages\Pages;
|
||||
|
||||
use MailPoet\AdminPages\PageRenderer;
|
||||
use MailPoet\WP\Functions as WPFunctions;
|
||||
|
||||
class AutomationEditor {
|
||||
/** @var PageRenderer */
|
||||
private $pageRenderer;
|
||||
|
||||
/** @var WPFunctions */
|
||||
private $wp;
|
||||
|
||||
public function __construct(
|
||||
PageRenderer $pageRenderer,
|
||||
WPFunctions $wp
|
||||
) {
|
||||
$this->pageRenderer = $pageRenderer;
|
||||
$this->wp = $wp;
|
||||
}
|
||||
|
||||
public function render() {
|
||||
$this->pageRenderer->displayPage('automation/editor.html', [
|
||||
'sub_menu' => 'mailpoet-automation',
|
||||
'api' => [
|
||||
'root' => rtrim($this->wp->escUrlRaw($this->wp->restUrl()), '/'),
|
||||
'nonce' => $this->wp->wpCreateNonce('wp_rest'),
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user