protected function loadViewHelper($helperKey) { if (isset($this->loadedHelperFiles[strtolower($helperKey)])) { return $this->loadedHelperFiles[strtolower($helperKey)]['class']; } foreach ($this->viewHelperIncludePath as $extensionKey => $viewHelperPath) { $viewHelperRealPath = $viewHelperRealPath; if (t3lib_div::isFirstPartOfStr($viewHelperPath, 'classes/')) { $viewHelperRealPath = substr($viewHelperPath, 8); } if (substr($viewHelperRealPath, -1) == '/') { $viewHelperRealPath = substr($viewHelperRealPath, 0, -1); } $classNamePrefix = t3lib_extMgm::getCN($extensionKey); $possibleFilename = 'class.' . $classNamePrefix . '_' . str_replace('/', '_', $viewHelperRealPath) . '_' . strtolower(str_replace('_', '', $helperKey)) . '.php'; $possibleClassName = $classNamePrefix . '_' . str_replace('/', '_', $viewHelperRealPath) . '_' . tx_solr_Util::underscoredToUpperCamelCase($helperKey); $viewHelperIncludePath = t3lib_extMgm::extPath($extensionKey) . $viewHelperPath . $possibleFilename; if (file_exists($viewHelperIncludePath)) { include_once $viewHelperIncludePath; $this->loadedHelperFiles[strtolower($helperKey)] = array('file' => $viewHelperIncludePath, 'class' => $possibleClassName); return $possibleClassName; } } // viewhelper could not be found return FALSE; }