Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get navigation icon from config #14

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/Resources/EmailTemplateResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ class EmailTemplateResource extends Resource
{
protected static ?string $model = EmailTemplate::class;

protected static ?string $navigationIcon = 'heroicon-o-envelope';
public static function getNavigationIcon(): ?string
{
return config('filament-email-templates.navigation.templates.icon');
}

public static function getNavigationGroup(): ?string
{
Expand All @@ -48,12 +51,12 @@ public static function getNavigationSort(): ?int

public static function getModelLabel(): string
{
return __('vb-email-templates::email-templates.resource_name.singular');
return config('filament-email-templates.navigation.themes.label');
}

public static function getPluralModelLabel(): string
{
return __('vb-email-templates::email-templates.resource_name.plural');
return config('filament-email-templates.navigation.themes.label');
}

public static function getCluster(): string
Expand Down
9 changes: 6 additions & 3 deletions src/Resources/EmailTemplateThemeResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ class EmailTemplateThemeResource extends Resource
{
protected static ?string $model = EmailTemplateTheme::class;

protected static ?string $navigationIcon = 'heroicon-o-paint-brush';
public static function getNavigationIcon(): ?string
{
return config('filament-email-templates.navigation.themes.icon');
}

public static function getNavigationGroup(): ?string
{
Expand All @@ -33,12 +36,12 @@ public static function getNavigationSort(): ?int

public static function getModelLabel(): string
{
return __('vb-email-templates::email-templates.theme_resource_name.singular');
return config('filament-email-templates.navigation.themes.label');
}

public static function getPluralModelLabel(): string
{
return __('vb-email-templates::email-templates.theme_resource_name.plural');
return config('filament-email-templates.navigation.themes.label');
}

public static function getCluster(): string
Expand Down