themes as $theme) { $out["{$theme->name} - {$theme->description}"] = $theme->cssMin; } return $response->withJson($out); } public function applyTheme(Request $request, Response $response): Response { if (!is_writable(BASE_DIR . 'static/bootstrap/css/bootstrap.min.css')) { $this->session->alert(lang('cannot_write_file'), 'danger'); return redirect($response, 'system'); } file_put_contents(BASE_DIR . 'static/bootstrap/css/bootstrap.min.css', file_get_contents($request->getParam('css'))); return redirect($response, 'system'); } }