mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-04 20:36:03 +01:00
Oops, removed by mistake
This commit is contained in:
@@ -67,4 +67,25 @@ class WhiteLabel
|
||||
}
|
||||
return [false, ' Could not be recompiled, missing color scheme...'];
|
||||
}
|
||||
|
||||
public function exportPresetScsss($config, $location = 'asset://admin-theme-export.yaml')
|
||||
{
|
||||
|
||||
if (isset($config['color_scheme'])) {
|
||||
|
||||
$color_scheme = $config['color_scheme'];
|
||||
|
||||
$body = Yaml::dump($color_scheme);
|
||||
|
||||
$file = new File($location);
|
||||
$file->save($body);
|
||||
// todo: handle errors/exceptions?
|
||||
|
||||
return [true, 'File created successfully'];
|
||||
|
||||
} else {
|
||||
return [false, ' Could not export, missing color scheme...'];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user