|
|
@@ -57,14 +57,14 @@ class ProductCategoryFieldDefinition extends AbstractFieldDefinition |
|
|
|
public function configurePanelMain(): array |
|
|
|
{ |
|
|
|
return [ |
|
|
|
'section', |
|
|
|
'parent', |
|
|
|
'title', |
|
|
|
'description', |
|
|
|
'image', |
|
|
|
'status', |
|
|
|
'saleStatus', |
|
|
|
'isEligibleTicketRestaurant', |
|
|
|
'section', |
|
|
|
'parent', |
|
|
|
'title', |
|
|
|
'description', |
|
|
|
'image', |
|
|
|
'status', |
|
|
|
'saleStatus', |
|
|
|
'isEligibleTicketRestaurant', |
|
|
|
]; |
|
|
|
} |
|
|
|
|
|
|
@@ -78,7 +78,13 @@ class ProductCategoryFieldDefinition extends AbstractFieldDefinition |
|
|
|
'title' => TextField::new('title')->setSortable(true), |
|
|
|
'position' => NumberField::new('position')->setSortable(true), |
|
|
|
'parent' => AssociationField::new('parent') |
|
|
|
->setFormTypeOption('choices', $productCategoryArray), |
|
|
|
->setFormTypeOption('choices', $productCategoryArray) |
|
|
|
->setFormTypeOption( |
|
|
|
'choice_label', |
|
|
|
function ($productCategory) { |
|
|
|
return $productCategory->getTitle() . ' (' . $productCategory->getSection() . ')'; |
|
|
|
} |
|
|
|
), |
|
|
|
'image' => ImageManagerField::new('image'), |
|
|
|
'description' => CKEditorField::new('description'), |
|
|
|
'saleStatus' => ToggleField::new('saleStatus')->setSortable(true), |