Skip to content

Commit

Permalink
fix imports in generated classes
Browse files Browse the repository at this point in the history
  • Loading branch information
danharrin committed Feb 1, 2025
1 parent 55c0455 commit bb9651b
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ protected function addMethodsToClass(ClassType $class): void
protected function addNavigationIconPropertyToClass(ClassType $class): void
{
$this->namespace->addUse(BackedEnum::class);
$this->namespace->addUse(Heroicon::class);

$property = $class->addProperty('navigationIcon', Heroicon::OutlinedCog6Tooth)
$property = $class->addProperty('navigationIcon', new Literal('Heroicon::OutlinedCog6Tooth'))
->setProtected()
->setStatic()
->setType('string|BackedEnum|null');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ use BackedEnum;
use Filament\Forms;
use Filament\Pages\SettingsPage;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tests\Panels\Commands\Legacy\Settings;

class ManageSettings extends SettingsPage
{
protected static string|BackedEnum|null $navigationIcon = \Filament\Support\Icons\Heroicon::OutlinedCog6Tooth;
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedCog6Tooth;

protected static string $settings = Settings::class;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ use BackedEnum;
use Filament\Forms;
use Filament\Pages\SettingsPage;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tests\Panels\Commands\Legacy\Settings;

class ManageSettings extends SettingsPage
{
protected static string|BackedEnum|null $navigationIcon = \Filament\Support\Icons\Heroicon::OutlinedCog6Tooth;
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedCog6Tooth;

protected static string $settings = Settings::class;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ use BackedEnum;
use Filament\Forms;
use Filament\Pages\SettingsPage;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tests\Panels\Commands\Legacy\Settings;

class ManageSettings extends SettingsPage
{
protected static string|BackedEnum|null $navigationIcon = \Filament\Support\Icons\Heroicon::OutlinedCog6Tooth;
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedCog6Tooth;

protected static string $settings = Settings::class;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ use BackedEnum;
use Filament\Forms;
use Filament\Pages\SettingsPage;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tests\Panels\Commands\Legacy\Settings;
use Filament\Tests\Panels\Commands\Legacy\SettingsPropertyEnum;

class ManageSettings extends SettingsPage
{
protected static string|BackedEnum|null $navigationIcon = \Filament\Support\Icons\Heroicon::OutlinedCog6Tooth;
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedCog6Tooth;

protected static string $settings = Settings::class;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ namespace App\Filament\Pages;
use BackedEnum;
use Filament\Pages\SettingsPage;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tests\Panels\Commands\Settings;

class ManageSettings extends SettingsPage
{
protected static string|BackedEnum|null $navigationIcon = \Filament\Support\Icons\Heroicon::OutlinedCog6Tooth;
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedCog6Tooth;

protected static string $settings = Settings::class;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ use App\Filament\Clusters\Site\SiteCluster;
use BackedEnum;
use Filament\Pages\SettingsPage;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tests\Panels\Commands\Settings;

class ManageSettings extends SettingsPage
{
protected static string|BackedEnum|null $navigationIcon = \Filament\Support\Icons\Heroicon::OutlinedCog6Tooth;
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedCog6Tooth;

protected static string $settings = Settings::class;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ namespace App\Filament\Pages\Site;
use BackedEnum;
use Filament\Pages\SettingsPage;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tests\Panels\Commands\Settings;

class ManageSettings extends SettingsPage
{
protected static string|BackedEnum|null $navigationIcon = \Filament\Support\Icons\Heroicon::OutlinedCog6Tooth;
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedCog6Tooth;

protected static string $settings = Settings::class;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Toggle;
use Filament\Pages\SettingsPage;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tests\Panels\Commands\Settings;
use Filament\Tests\Panels\Commands\SettingsPropertyEnum;

class ManageSettings extends SettingsPage
{
protected static string|BackedEnum|null $navigationIcon = \Filament\Support\Icons\Heroicon::OutlinedCog6Tooth;
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedCog6Tooth;

protected static string $settings = Settings::class;

Expand Down

0 comments on commit bb9651b

Please sign in to comment.