protected function addRequest(Control $outerPanel, Request $request, &$i) { $i++; $innerPanel = new CaptionedPanelControl($outerPanel, 'nfsReq' . $i); $innerPanel->setCaption($request->module . '::' . $request->action); $innerPanel->add($this->getListView('nfsReqView' . $i, $this->arrayToDataArray($request->getFullArray()))); foreach ($request->getSubRequests() as $current) { $this->addRequest($outerPanel, $current, $i); } }