From 2c48fbe4583d0e84a5c06ee4db3598e87f8b0aa4 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Sun, 28 Aug 2022 13:29:23 +0200 Subject: [PATCH] wip #5408 --- src/app/Magic/SubForm.php | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/app/Magic/SubForm.php b/src/app/Magic/SubForm.php index 2d2c271..3af9f23 100644 --- a/src/app/Magic/SubForm.php +++ b/src/app/Magic/SubForm.php @@ -6,9 +6,7 @@ namespace Cubist\Backpack\Magic; class SubForm { - use BunchOfFields{ - addField as bofAddField; - } + use BunchOfFields; public function __construct() { @@ -19,12 +17,12 @@ class SubForm } - public function addField($name, $type = 'Text', $label = '', $attributes = []) - { - $reserved = ['type','name']; - if (in_array($name, $reserved)) { - throw new \Exception('The field name `' . $name . '` is a reserved name and can not be used in a subform.'); - } - return $this->bofAddField($name,$type,$label,$attributes); - } +// public function addField($name, $type = 'Text', $label = '', $attributes = []) +// { +// $reserved = ['type','name']; +// if (in_array($name, $reserved)) { +// throw new \Exception('The field name `' . $name . '` is a reserved name and can not be used in a subform.'); +// } +// return $this->bofAddField($name,$type,$label,$attributes); +// } } -- 2.39.5