Browse Source

增加 NestedForm::getParentKey 方法

jqh 4 years ago
parent
commit
df9264f3c3
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/Form/NestedForm.php

+ 8 - 0
src/Form/NestedForm.php

@@ -148,6 +148,14 @@ class NestedForm extends WidgetForm
         return $input;
     }
 
+    /**
+     * @return mixed
+     */
+    public function getParentKey()
+    {
+        return $this->form->getKey();
+    }
+
     /**
      * Get key for current form.
      *