From 895d5065ca25f4014c00eb17895cd2102d5be157 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Sat, 27 May 2023 15:08:16 +0200 Subject: [PATCH] add setter to define all fields in a defined context --- src/core/Crud/CrudConfiguration.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core/Crud/CrudConfiguration.php b/src/core/Crud/CrudConfiguration.php index 8740b73..534ff9c 100644 --- a/src/core/Crud/CrudConfiguration.php +++ b/src/core/Crud/CrudConfiguration.php @@ -251,6 +251,13 @@ class CrudConfiguration return $this->fields[$context] ?? []; } + public function setFields(string $context, array $fields): self + { + $this->fields[$context] = $fields; + + return $this; + } + /* -- */ public function setMaxPerPage(string $page, int $max): self