浏览代码

增加 NestedForm::getParentKey 方法

jqh 4 年之前
父节点
当前提交
df9264f3c3
共有 1 个文件被更改,包括 8 次插入0 次删除
  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.
      *