added in a getter

This commit is contained in:
John Milmine 2014-05-28 13:58:40 +12:00
parent 1c9f9551b6
commit da67f9109d

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