TYPO3 CMS  TYPO3_6-2
NotFoundView.php
Go to the documentation of this file.
1 <?php
3 
22 
26  protected $variablesMarker = array('errorMessage' => 'ERROR_MESSAGE');
27 
35  public function render() {
36  if (!is_object($this->controllerContext->getRequest())) {
37  throw new \TYPO3\CMS\Extbase\Mvc\Exception('Can\'t render view without request object.', 1192450280);
38  }
39  $template = file_get_contents($this->getTemplatePathAndFilename());
40  if ($this->controllerContext->getRequest() instanceof \TYPO3\CMS\Extbase\Mvc\Web\Request) {
41  $template = str_replace('###BASEURI###', \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL'), $template);
42  }
43  foreach ($this->variablesMarker as $variableName => $marker) {
44  $variableValue = isset($this->variables[$variableName]) ? $this->variables[$variableName] : '';
45  $template = str_replace('###' . $marker . '###', $variableValue, $template);
46  }
47  return $template;
48  }
49 
55  protected function getTemplatePathAndFilename() {
56  return \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('extbase') . 'Resources/Private/MVC/NotFoundView_Template.html';
57  }
58 
71  public function __call($methodName, array $arguments) {
72  }
73 }
__call($methodName, array $arguments)