/** * @test */ public function viewArray() { $msg = tx_additionalreports_util::viewArray(array()); $this->assertTrue(!empty($msg)); }
/** * Generate the hooks report * * @return string HTML code */ public static function displayHooks() { $hooks = array(); // core hooks $items = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']; if (count($items) > 0) { foreach ($items as $itemKey => $itemValue) { if (preg_match('/.*?\\/.*?\\.php/', $itemKey, $matches)) { foreach ($itemValue as $hookName => $hookList) { $hookList = tx_additionalreports_util::getHook($hookList); if (!empty($hookList)) { $hooks['core'][] = array('corefile' => $itemKey, 'name' => $hookName, 'file' => tx_additionalreports_util::viewArray($hookList)); } } } } } $items = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']; if (count($items) > 0) { foreach ($items as $itemKey => $itemValue) { foreach ($itemValue as $hookName => $hookList) { $hookList = tx_additionalreports_util::getHook($hookList); if (!empty($hookList)) { $hooks['extensions'][] = array('corefile' => $itemKey, 'name' => $hookName, 'file' => tx_additionalreports_util::viewArray($hookList)); } } } } $view = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Fluid\\View\\StandaloneView'); $view->setTemplatePathAndFilename(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('additional_reports') . 'Resources/Private/Templates/hooks-fluid.html'); $view->assign('hooks', $hooks); return $view->render(); }