Skip to content

Commit

Permalink
fix easyadmin boolean state
Browse files Browse the repository at this point in the history
  • Loading branch information
aynsix committed Jan 18, 2024
1 parent 8b98404 commit 9fe37b1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud;
use EasyCorp\Bundle\EasyAdminBundle\Config\Filters;
use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField;
use EasyCorp\Bundle\EasyAdminBundle\Field\Field;
use EasyCorp\Bundle\EasyAdminBundle\Field\BooleanField;
use EasyCorp\Bundle\EasyAdminBundle\Field\IntegerField;
use EasyCorp\Bundle\EasyAdminBundle\Filter\EntityFilter;

Expand Down Expand Up @@ -40,7 +40,7 @@ public function configureFields(string $pageName): iterable
$workspace = AssociationField::new('workspace');
$definition = AssociationField::new('definition');
$priority = IntegerField::new('priority');
$overrides = Field::new('overrides');
$overrides = BooleanField::new('overrides');
$id = IdField::new();

if (Crud::PAGE_INDEX === $pageName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud;
use EasyCorp\Bundle\EasyAdminBundle\Config\Filters;
use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField;
use EasyCorp\Bundle\EasyAdminBundle\Field\BooleanField;
use EasyCorp\Bundle\EasyAdminBundle\Field\DateTimeField;
use EasyCorp\Bundle\EasyAdminBundle\Field\Field;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
use EasyCorp\Bundle\EasyAdminBundle\Filter\EntityFilter;

Expand Down Expand Up @@ -42,8 +42,8 @@ public function configureFields(string $pageName): iterable
{
$workspace = AssociationField::new('workspace');
$name = TextField::new('name');
$public = Field::new('public');
$editable = Field::new('editable');
$public = BooleanField::new('public');
$editable = BooleanField::new('editable');
$id = IdField::new();
$key = TextField::new('key');
$createdAt = DateTimeField::new('createdAt');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud;
use EasyCorp\Bundle\EasyAdminBundle\Config\Filters;
use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField;
use EasyCorp\Bundle\EasyAdminBundle\Field\BooleanField;
use EasyCorp\Bundle\EasyAdminBundle\Field\DateTimeField;
use EasyCorp\Bundle\EasyAdminBundle\Field\Field;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
use EasyCorp\Bundle\EasyAdminBundle\Filter\EntityFilter;

Expand Down Expand Up @@ -41,7 +41,7 @@ public function configureFields(string $pageName): iterable
$id = IdField::new();
$workspace = AssociationField::new('workspace');
$name = TextField::new('name');
$public = Field::new('public');
$public = BooleanField::new('public');
$createdAt = DateTimeField::new('createdAt');
$definitions = AssociationField::new('definitions');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud;
use EasyCorp\Bundle\EasyAdminBundle\Config\Filters;
use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField;
use EasyCorp\Bundle\EasyAdminBundle\Field\BooleanField;
use EasyCorp\Bundle\EasyAdminBundle\Field\DateTimeField;
use EasyCorp\Bundle\EasyAdminBundle\Field\Field;
use EasyCorp\Bundle\EasyAdminBundle\Field\IntegerField;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextareaField;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
use EasyCorp\Bundle\EasyAdminBundle\Filter\EntityFilter;

Expand Down Expand Up @@ -58,9 +58,9 @@ public function configureFields(string $pageName): iterable
;
yield Field::new('pickSourceFile')
->hideOnIndex();
yield Field::new('useAsOriginal');
yield Field::new('useAsPreview');
yield Field::new('useAsThumbnail');
yield BooleanField::new('useAsOriginal');
yield BooleanField::new('useAsPreview');
yield BooleanField::new('useAsThumbnail');
yield Field::new('useAsThumbnailActive', 'Thumb Active')
->hideOnIndex();
yield IntegerField::new('priority');
Expand Down

0 comments on commit 9fe37b1

Please sign in to comment.