Added cache clear + toastr js lib for notifications

This commit is contained in:
Andy Miller
2014-12-11 19:57:57 -07:00
parent d9b79f2917
commit b08766b4a9
13 changed files with 400 additions and 5 deletions

View File

@@ -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);