Server IP : 104.21.14.103 / Your IP : 52.15.52.31 Web Server : LiteSpeed System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : giankuin ( 1871) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/home/giankuin/thietke365.net/wp-content/plugins/mailpoet/lib/AdminPages/Pages/ |
Upload File : |
<?php declare(strict_types = 1); namespace MailPoet\AdminPages\Pages; if (!defined('ABSPATH')) exit; use MailPoet\AdminPages\PageRenderer; use MailPoet\Automation\Engine\Data\AutomationTemplate; use MailPoet\Automation\Engine\Registry; use MailPoet\Automation\Engine\Storage\AutomationStorage; use MailPoet\Form\AssetsController; use MailPoet\WP\Functions as WPFunctions; class Automation { /** @var AssetsController */ private $assetsController; /** @var PageRenderer */ private $pageRenderer; /** @var WPFunctions */ private $wp; /** @var AutomationStorage */ private $automationStorage; /** @var Registry */ private $registry; public function __construct( AssetsController $assetsController, PageRenderer $pageRenderer, WPFunctions $wp, AutomationStorage $automationStorage, Registry $registry ) { $this->assetsController = $assetsController; $this->pageRenderer = $pageRenderer; $this->wp = $wp; $this->automationStorage = $automationStorage; $this->registry = $registry; } public function render() { $this->assetsController->setupAutomationListingDependencies(); $this->pageRenderer->displayPage('automation.html', [ 'locale_full' => $this->wp->getLocale(), 'api' => [ 'root' => rtrim($this->wp->escUrlRaw($this->wp->restUrl()), '/'), 'nonce' => $this->wp->wpCreateNonce('wp_rest'), ], 'automationCount' => $this->automationStorage->getAutomationCount(), 'templates' => array_map( function(AutomationTemplate $template): array { return $template->toArray(); }, array_values($this->registry->getTemplates()) ), ]); } }