formwork/panel/helpers.php

15 lines
355 B
PHP
Raw Normal View History

<?php
2023-07-29 22:39:28 +02:00
use Formwork\Config;
use Formwork\Panel\Panel;
2022-11-27 19:30:21 +01:00
use Formwork\Utils\FileSystem;
2023-07-29 22:39:28 +02:00
return function (Config $config, Panel $panel) {
return [
'assets' => $panel->assets(...),
2022-12-11 16:48:45 +01:00
2023-07-29 22:39:28 +02:00
'icon' => fn (string $icon) => FileSystem::read(FileSystem::joinPaths($config->get('system.panel.paths.assets'), '/icons/svg/', $icon . '.svg')),
];
};