From 7f64d21cc04868c8526eb0e2600e9c4441a645ea Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Mon, 12 Jul 2021 13:15:47 +0200 Subject: [PATCH] add page route parameters in crud configuration --- core/Crud/CrudConfiguration.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/core/Crud/CrudConfiguration.php b/core/Crud/CrudConfiguration.php index 451e337..3bc0282 100644 --- a/core/Crud/CrudConfiguration.php +++ b/core/Crud/CrudConfiguration.php @@ -13,6 +13,7 @@ class CrudConfiguration { protected array $pageTitles = []; protected array $pageRoutes = []; + protected array $pageRouteParams = []; protected array $actions = []; protected array $batchActions = []; protected array $actionTitles = []; @@ -67,6 +68,18 @@ class CrudConfiguration return $this->pageRoutes[$page]; } + public function setPageRouteParams(string $page, array $params): self + { + $this->pageRouteParams[$page] = $params; + + return $this; + } + + public function getPageRouteParams(string $page): array + { + return $this->pageRouteParams[$page] ?? []; + } + /* -- */ public function setForm(string $context, string $form, array $options = []): self