1 <?php
2
3 /*
4 * This file is part of the Icybee package.
5 *
6 * (c) Olivier Laviale <olivier.laviale@gmail.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Icybee\Modules\Modules;
13
14 use ICanBoogie\HTTP\Request;
15
16 /**
17 * The controller flushes the `core.modules` when it is invoked so that the module list rendered
18 * is always up-to-date with what is actually on disk.
19 */
20 class ManageController extends \Icybee\BlockController
21 {
22 public function __invoke(Request $request)
23 {
24 global $core;
25
26 if ($core->has_property('cache'))
27 {
28 $core->cache['core.modules']->clear();
29 }
30
31 return parent::__invoke($request);
32 }
33 }