1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-26 14:34:31 +02:00

Admin Panel: Tools #170 #165

- next round of implementation
This commit is contained in:
Awilum
2019-06-22 10:27:06 +03:00
parent 370b24c0eb
commit 5ff4858a5c

View File

@@ -109,10 +109,10 @@ class ToolsController extends Controller
],
],
'buttons' => [
'settings_clear_cache' => [
'tools_clear_cache' => [
'type' => 'action',
'id' => 'clear-cache',
'link' => $this->router->pathFor('admin.settings.clear-cache'),
'id' => 'clear-cache-all',
'link' => $this->router->pathFor('admin.tools.clearCacheAllProcess'),
'title' => __('admin_clear_cache_all'),
'attributes' => ['class' => 'float-right btn']
]
@@ -133,6 +133,15 @@ class ToolsController extends Controller
return $response->withRedirect($this->router->pathFor('admin.tools.cache'));
}
public function clearCacheAllProcess($request, $response)
{
$this->cache->clearAll();
$this->flash->addMessage('success', __('admin_message_cache_files_deleted'));
return $response->withRedirect($this->router->pathFor('admin.tools.cache'));
}
public function getDirectorySize($path)
{