# acymailing/10.2.2/back/Controllers/DashboardController.php

AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress, version 10.2.2. 78 lines.

- Page: https://pluginprobe.com/plugins/acymailing/10.2.2/code/back/Controllers/DashboardController.php
- Raw: https://pluginprobe.com/plugins/acymailing/10.2.2/raw/back/Controllers/DashboardController.php
- Modified: 2025-04-28T10:20:02+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/acymailing/10.2.2/code/back/Controllers/DashboardController.php#L10-L20`.

```php
<?php

namespace AcyMailing\Controllers;

use AcyMailing\Core\AcymController;
use AcyMailing\Controllers\Dashboard\Listing;
use AcyMailing\Controllers\Dashboard\Walkthrough;
use AcyMailing\Controllers\Dashboard\Migration;

class DashboardController extends AcymController
{
    use Listing;
    use Walkthrough;
    use Migration;

    public function __construct()
    {
        parent::__construct();

        $this->loadScripts = [
            'features' => ['vue-applications' => ['splashscreen']],
            'step_editor' => ['editor-wysid'],
        ];
    }

    public function upgrade(): void
    {
        acym_setVar('layout', 'upgrade');

        $version = acym_getVar('string', 'version', 'enterprise');

        $data = ['version' => $version];

        parent::display($data);
    }

    public function features(): void
    {
        if (!file_exists(ACYM_NEW_FEATURES_SPLASHSCREEN_JSON)) {
            $this->listing();

            return;
        }

        $splashJson = acym_fileGetContent(ACYM_NEW_FEATURES_SPLASHSCREEN_JSON);
        $version = json_decode($splashJson);
        if (version_compare($this->config->get('previous_version', '10.2.2'), $version->max_version, '>=')) {
            @unlink(ACYM_NEW_FEATURES_SPLASHSCREEN_JSON);
            $this->listing();

            return;
        }

        ob_start();
        include ACYM_NEW_FEATURES_SPLASHSCREEN;
        $data = [
            'content' => ob_get_clean(),
        ];

        if (!@unlink(ACYM_NEW_FEATURES_SPLASHSCREEN_JSON)) {
            $this->listing();

            return;
        }

        acym_setVar('layout', 'features');

        parent::display($data);
    }

    public function acychecker(): void
    {
        acym_setVar('layout', 'acychecker');

        parent::display();
    }
}

```
