Skip to content
Snippets Groups Projects

Draft: Data vue app

Open Jan-Hendrik Willms requested to merge data-vue-app into main
All threads resolved!
Files
16
@@ -64,19 +64,21 @@ class Admin_CacheController extends AuthenticatedController
*/
public function settings_action()
{
if ($this->enabled) {
$this->types = CacheType::findAndMapBySQL(function (CacheType $type) {
return $type->toArray();
}, "1 ORDER BY `cache_id`");
$currentCache = Config::get()->SYSTEMCACHE;
$currentCacheClass = CacheType::findOneByClass_name($currentCache['type']);
$this->cache = $currentCacheClass->class_name;
$this->config = $currentCacheClass->class_name::getConfig();
} else {
PageLayout::postWarning(
_('Caching ist systemweit ausgeschaltet, daher kann hier nichts konfiguriert werden.'));
}
$currentCache = Config::get()->SYSTEMCACHE;
$currentCacheClass = CacheType::findOneByClass_name($currentCache['type']);
$this->render_vue_app(
Studip\VueApp::create('CacheAdministration')
->withProps([
'enabled' => $this->enabled,
'cache' => $currentCacheClass->class_name,
'config' => $currentCacheClass->class_name::getConfig(),
'types' => CacheType::findAndMapBySQL(
fn(CacheType $type) => $type->toArray(),
"1 ORDER BY `cache_id`"
),
])
);
}
/**
Loading