| 1 |
<?php |
| 2 |
namespace Mgleis\DiskUsageInsights\Frontend\Controller; |
| 3 |
|
| 4 |
use Mgleis\DiskUsageInsights\Domain\DatabaseRepository; |
| 5 |
use Mgleis\DiskUsageInsights\Plugin; |
| 6 |
use Mgleis\DiskUsageInsights\WpHelper; |
| 7 |
|
| 8 |
class ShowSnapshotsController { |
| 9 |
|
| 10 |
public function execute() { |
| 11 |
|
| 12 |
// TODO LIST DATABASES |
| 13 |
$databaseRepository = new DatabaseRepository(); |
| 14 |
$DATABASES = $databaseRepository->listDatabases(); |
| 15 |
|
| 16 |
$WP_PLUGIN_URL = WpHelper::getPluginUrl(); |
| 17 |
$WP_NONCE = wp_create_nonce(Plugin::NONCE); |
| 18 |
$WP_ADMIN_AJAX_URL = admin_url('admin-ajax.php'); |
| 19 |
|
| 20 |
include_once __DIR__ . '/../../../views/snapshots.php'; |
| 21 |
wp_die(); |
| 22 |
} |
| 23 |
|
| 24 |
} |
| 25 |
|