TYPO3 CMS  TYPO3_6-2
FrontendRequestHandler.php
Go to the documentation of this file.
1 <?php
3 
20 
26 
31  protected $extensionService;
32 
38  public function handleRequest() {
39  $request = $this->requestBuilder->build();
41  $requestHashService = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Security\\Channel\\RequestHashService');
42  $requestHashService->verifyRequest($request);
43  if ($this->extensionService->isActionCacheable(NULL, NULL, $request->getControllerName(), $request->getControllerActionName())) {
44  $request->setIsCached(TRUE);
45  } else {
46  $contentObject = $this->configurationManager->getContentObject();
47  if ($contentObject->getUserObjectType() === \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::OBJECTTYPE_USER) {
48  $contentObject->convertToUserIntObject();
49  // \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::convertToUserIntObject() will recreate the object, so we have to stop the request here
50  return NULL;
51  }
52  $request->setIsCached(FALSE);
53  }
55  $response = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Response');
56  $this->dispatcher->dispatch($request, $response);
57  return $response;
58  }
59 
65  public function canHandleRequest() {
66  return $this->environmentService->isEnvironmentInFrontendMode();
67  }
68 }