Merge pull request #3129 from dnadesign/formFieldContainerFieldList

added in a containerFieldList getter
This commit is contained in:
Stig Lindqvist 2014-06-14 17:06:15 +12:00
commit 332c2c3db0

View File

@ -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);