/** * Collects data for the given Request and Response. * * @param Request $request A Request instance * @param Response $response A Response instance * @param \Exception $exception An Exception instance * * @api */ public function collect(Request $request, Response $response, \Exception $exception = null) { $this->data['currentView'] = $this->deviceView->getViewType(); $this->data['views'] = array(array('label' => 'Full', 'link' => $this->generateSwitchLink($request, DeviceView::VIEW_FULL), 'isCurrent' => $this->deviceView->isFullView()), array('label' => 'Tablet', 'link' => $this->generateSwitchLink($request, DeviceView::VIEW_TABLET), 'isCurrent' => $this->deviceView->isTabletView()), array('label' => 'Mobile', 'link' => $this->generateSwitchLink($request, DeviceView::VIEW_MOBILE), 'isCurrent' => $this->deviceView->isMobileView())); }