From 1c3ec1935377e9a1469d44ecb083622b996e5343 Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Fri, 5 Aug 2016 10:55:41 +1200 Subject: [PATCH] API Move NestedController from cms to framework --- control/Controller.php | 2 +- control/NestedController.php | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 control/NestedController.php diff --git a/control/Controller.php b/control/Controller.php index 29abfc30cac..025fb00a606 100644 --- a/control/Controller.php +++ b/control/Controller.php @@ -363,7 +363,7 @@ public function getFormOwner() { if(isset($this->requestParams['formController'])) { $formController = Director::getControllerForURL($this->requestParams['formController']); - while(is_a($formController, 'NestedController')) { + while ($formController instanceof NestedController) { $formController = $formController->getNestedController(); } return $formController; diff --git a/control/NestedController.php b/control/NestedController.php new file mode 100644 index 00000000000..1ced32138cf --- /dev/null +++ b/control/NestedController.php @@ -0,0 +1,19 @@ +