From 7ebb2dcdc950feb9be744b19acd81e4d8346a7a7 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Thu, 30 Jul 2015 11:49:08 +0200 Subject: [PATCH] QuickForm: add onRequest hook --- library/Director/Web/Form/QuickForm.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/library/Director/Web/Form/QuickForm.php b/library/Director/Web/Form/QuickForm.php index dcecf4c6..c13ff315 100644 --- a/library/Director/Web/Form/QuickForm.php +++ b/library/Director/Web/Form/QuickForm.php @@ -338,10 +338,21 @@ abstract class QuickForm extends Zend_Form Icinga::app()->getFrontController()->getResponse()->redirectAndExit($url); } + protected function onRequest() + { + } + + public function setRequest(Request $request) + { + $this->request = $request; + $this->onRequest(); + return $this; + } + public function getRequest() { if ($this->request === null) { - $this->request = Icinga::app()->getFrontController()->getRequest(); + $this->setRequest(Icinga::app()->getFrontController()->getRequest()); } return $this->request; }