Primo Committ

This commit is contained in:
paoloar77
2024-05-07 12:17:25 +02:00
commit e73d0e5113
7204 changed files with 884387 additions and 0 deletions

43
vendor/facade/ignition/src/Ignition.php vendored Normal file
View File

@@ -0,0 +1,43 @@
<?php
namespace Facade\Ignition;
use Closure;
use Facade\Ignition\Tabs\Tab;
class Ignition
{
/** @var Closure[] */
public static $callBeforeShowingErrorPage = [];
/** @var array */
public static $tabs = [];
public static function tab(Tab $tab)
{
static::$tabs[] = $tab;
}
public static function styles(): array
{
return collect(static::$tabs)->flatMap(function ($tab) {
return $tab->styles;
})
->unique()
->toArray();
}
public static function scripts(): array
{
return collect(static::$tabs)->flatMap(function ($tab) {
return $tab->scripts;
})
->unique()
->toArray();
}
public static function registerAssets(Closure $callable)
{
static::$callBeforeShowingErrorPage[] = $callable;
}
}