New Branch Structure
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Modules\Stylist\Html\ThemeHtmlBuilder;
|
||||
use Modules\Stylist\Theme\Stylist;
|
||||
use Modules\Stylist\Theme\UrlGenerator;
|
||||
use Modules\Stylist\View\ThemeViewResolver;
|
||||
|
||||
if (! function_exists('stylist')) {
|
||||
function stylist(): Stylist
|
||||
{
|
||||
return app(Stylist::class);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('stylist_html')) {
|
||||
function stylist_html(): ThemeHtmlBuilder
|
||||
{
|
||||
return app(ThemeHtmlBuilder::class);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('stylist_view')) {
|
||||
function stylist_view(string $view, array $data = [], array $mergeData = []): View
|
||||
{
|
||||
return app(ThemeViewResolver::class)->make($view, $data, $mergeData);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('stylist_theme_view')) {
|
||||
function stylist_theme_view(string $theme, string $view, array $data = [], array $mergeData = []): View
|
||||
{
|
||||
return app(ThemeViewResolver::class)->makeForTheme($theme, $view, $data, $mergeData);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('theme_asset')) {
|
||||
function theme_asset(string $path): string
|
||||
{
|
||||
return app(UrlGenerator::class)->asset($path);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('theme_switcher')) {
|
||||
function theme_switcher(): \Illuminate\Support\HtmlString
|
||||
{
|
||||
return stylist_html()->switcher();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user