From 9fe37b13ae864d4200615688752765d723d49c1a Mon Sep 17 00:00:00 2001 From: aynsix Date: Thu, 18 Jan 2024 15:52:54 +0300 Subject: [PATCH] fix easyadmin boolean state --- .../Admin/AssetTitleAttributeCrudController.php | 4 ++-- .../src/Controller/Admin/AttributeClassCrudController.php | 6 +++--- .../src/Controller/Admin/RenditionClassCrudController.php | 4 ++-- .../Admin/RenditionDefinitionCrudController.php | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/databox/api/src/Controller/Admin/AssetTitleAttributeCrudController.php b/databox/api/src/Controller/Admin/AssetTitleAttributeCrudController.php index c8579ab21..0e11d587e 100644 --- a/databox/api/src/Controller/Admin/AssetTitleAttributeCrudController.php +++ b/databox/api/src/Controller/Admin/AssetTitleAttributeCrudController.php @@ -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; @@ -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) { diff --git a/databox/api/src/Controller/Admin/AttributeClassCrudController.php b/databox/api/src/Controller/Admin/AttributeClassCrudController.php index 8f4f815d4..69f3610f8 100644 --- a/databox/api/src/Controller/Admin/AttributeClassCrudController.php +++ b/databox/api/src/Controller/Admin/AttributeClassCrudController.php @@ -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; @@ -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'); diff --git a/databox/api/src/Controller/Admin/RenditionClassCrudController.php b/databox/api/src/Controller/Admin/RenditionClassCrudController.php index 04eeaaec0..ed315f5d4 100644 --- a/databox/api/src/Controller/Admin/RenditionClassCrudController.php +++ b/databox/api/src/Controller/Admin/RenditionClassCrudController.php @@ -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; @@ -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'); diff --git a/databox/api/src/Controller/Admin/RenditionDefinitionCrudController.php b/databox/api/src/Controller/Admin/RenditionDefinitionCrudController.php index eeb4eb02d..6c1ca293d 100644 --- a/databox/api/src/Controller/Admin/RenditionDefinitionCrudController.php +++ b/databox/api/src/Controller/Admin/RenditionDefinitionCrudController.php @@ -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; @@ -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');