From da67f9109dfe0119fa712b3440fa6e41162ff4ff Mon Sep 17 00:00:00 2001 From: John Milmine Date: Wed, 28 May 2014 13:58:40 +1200 Subject: [PATCH] added in a getter --- forms/FormField.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/forms/FormField.php b/forms/FormField.php index 4007bc627..c78095133 100644 --- a/forms/FormField.php +++ b/forms/FormField.php @@ -851,6 +851,15 @@ class FormField extends RequestHandler { return $this; } + /** + * Get the FieldList that contains this field. + * + * @return FieldList + */ + public function getContainerFieldList() { + return $this->containerFieldList; + } + public function rootFieldList() { if(is_object($this->containerFieldList)) return $this->containerFieldList->rootFieldList(); else user_error("rootFieldList() called on $this->class object without a containerFieldList", E_USER_ERROR);