| @@ 23-38 (lines=16) @@ | ||
| 20 | ||
| 21 | namespace HaaseIT\HCSF\Controller\Admin; |
|
| 22 | ||
| 23 | class ClearImageCache extends Base |
|
| 24 | { |
|
| 25 | public function preparePage() |
|
| 26 | { |
|
| 27 | $this->P = new \HaaseIT\HCSF\CorePage($this->serviceManager, [], 'admin/base.twig'); |
|
| 28 | $this->P->cb_pagetype = 'content'; |
|
| 29 | $this->P->cb_subnav = 'admin'; |
|
| 30 | ||
| 31 | $this->P->oPayload->cl_html = 'The image cache has been cleared.'; |
|
| 32 | ||
| 33 | $adapter = new \League\Flysystem\Adapter\Local(PATH_CACHE); |
|
| 34 | $filesystem = new \League\Flysystem\Filesystem($adapter); |
|
| 35 | $filesystem->deleteDir(DIRNAME_GLIDECACHE); |
|
| 36 | $filesystem->createDir(DIRNAME_GLIDECACHE); |
|
| 37 | } |
|
| 38 | } |
|
| 39 | ||
| @@ 23-38 (lines=16) @@ | ||
| 20 | ||
| 21 | namespace HaaseIT\HCSF\Controller\Admin; |
|
| 22 | ||
| 23 | class ClearTemplateCache extends Base |
|
| 24 | { |
|
| 25 | public function preparePage() |
|
| 26 | { |
|
| 27 | $this->P = new \HaaseIT\HCSF\CorePage($this->serviceManager, [], 'admin/base.twig'); |
|
| 28 | $this->P->cb_pagetype = 'content'; |
|
| 29 | $this->P->cb_subnav = 'admin'; |
|
| 30 | ||
| 31 | $this->P->oPayload->cl_html = 'The template cache has been cleared.'; |
|
| 32 | ||
| 33 | $adapter = new \League\Flysystem\Adapter\Local(PATH_CACHE); |
|
| 34 | $filesystem = new \League\Flysystem\Filesystem($adapter); |
|
| 35 | $filesystem->deleteDir(DIRNAME_TEMPLATECACHE); |
|
| 36 | $filesystem->createDir(DIRNAME_TEMPLATECACHE); |
|
| 37 | } |
|
| 38 | } |
|
| 39 | ||