Skip to content

Commit

Permalink
feat: AssetManager
Browse files Browse the repository at this point in the history
Append/Create
  • Loading branch information
lee-to committed Nov 29, 2024
1 parent 8514f0c commit cb9650b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
11 changes: 10 additions & 1 deletion src/AssetManager/AssetManagerContract.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,22 @@

namespace MoonShine\Contracts\AssetManager;

use Closure;
use Illuminate\Contracts\Support\Htmlable;
use MoonShine\Contracts\Core\StatefulContract;

interface AssetManagerContract extends Htmlable
interface AssetManagerContract extends Htmlable, StatefulContract
{
public function getAsset(string $path): string;

public function getAssets(): AssetElementsContract;

/** @param Closure(array $assets): array $callback */
public function modifyAssets(Closure $callback): static;

public function add(AssetElementContract|array $assets): static;

public function prepend(AssetElementContract|array $assets): static;

public function append(AssetElementContract|array $assets): static;
}
2 changes: 1 addition & 1 deletion src/Core/DependencyInjection/CoreContract.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function isProduction(): bool;
/**
* @template T
* @param class-string<T>|null $id
* @return T|ContainerInterface
* @return null|T|ContainerInterface
*/
public function getContainer(?string $id = null, mixed $default = null, ...$parameters): mixed;

Expand Down
3 changes: 2 additions & 1 deletion src/MenuManager/MenuManagerContract.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
namespace MoonShine\Contracts\MenuManager;

use Closure;
use MoonShine\Contracts\Core\StatefulContract;

interface MenuManagerContract
interface MenuManagerContract extends StatefulContract
{
public function add(array|MenuElementContract $data): static;

Expand Down

0 comments on commit cb9650b

Please sign in to comment.