mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-01 19:06:16 +01:00
Added cache clear + toastr js lib for notifications
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace Grav\Plugin;
|
||||
|
||||
use Grav\Common\Cache;
|
||||
use Grav\Common\Config\Config;
|
||||
use Grav\Common\Filesystem\Folder;
|
||||
use Grav\Common\Grav;
|
||||
@@ -137,6 +138,18 @@ class AdminController
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function taskClearCache()
|
||||
{
|
||||
$results = Cache::clearCache('standard');
|
||||
if (count($results) > 0) {
|
||||
$this->admin->json_response = ['success', 'Cache cleared'];
|
||||
} else {
|
||||
$this->admin->json_response = ['error', 'Error clearing cache'];
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function taskListmedia()
|
||||
{
|
||||
$page = $this->admin->page(true);
|
||||
|
||||
Reference in New Issue
Block a user