formwork/panel/helpers.php
2023-12-26 19:09:19 +01:00

15 lines
362 B
PHP

<?php
use Formwork\Config\Config;
use Formwork\Panel\Panel;
use Formwork\Utils\FileSystem;
return function (Config $config, Panel $panel) {
return [
'assets' => $panel->assets(...),
'icon' => fn (string $icon) => FileSystem::read(FileSystem::joinPaths($config->get('system.panel.paths.assets'), '/icons/svg/', $icon . '.svg')),
];
};