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()) ), ]); } }