mirror of
https://github.com/flextype/flextype.git
synced 2025-08-16 01:54:28 +02:00
Flextype Slim Integration - next round of integration
This commit is contained in:
@@ -54,7 +54,7 @@ class SettingsController extends Controller
|
||||
'themes' => $themes,
|
||||
'links' => [
|
||||
'settings' => [
|
||||
'link' => '/admin/settings',
|
||||
'link' => $this->router->urlFor('admin.settings.index'),
|
||||
'title' => __('admin_settings'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
]
|
||||
@@ -66,7 +66,9 @@ class SettingsController extends Controller
|
||||
'attributes' => ['class' => 'js-save-form-submit float-right btn']
|
||||
],
|
||||
'settings_clear_cache' => [
|
||||
'link' => '/admin/settings?clear_cache=1&token=' . 'asd',
|
||||
'type' => 'action',
|
||||
'id' => 'clear-cache',
|
||||
'link' => $this->router->urlFor('admin.settings.clear-cache'),
|
||||
'title' => __('admin_clear_cache'),
|
||||
'attributes' => ['class' => 'float-right btn']
|
||||
]
|
||||
@@ -98,4 +100,11 @@ class SettingsController extends Controller
|
||||
|
||||
return $response->withRedirect($this->container->get('router')->urlFor('admin.settings.index'));
|
||||
}
|
||||
|
||||
public function clearCache($request, $response, $args)
|
||||
{
|
||||
Cache::clear();
|
||||
$this->flash->addMessage('success', __('admin_message_cache_files_deleted'));
|
||||
return $response->withRedirect($this->container->get('router')->urlFor('admin.settings.index'));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user