33 parent::init(
$pObj, $conf);
34 $GLOBALS[
'LANG']->includeLLFile(
'EXT:tstemplate/Resources/Private/Language/locallang_analyzer.xlf');
35 $this->pObj->modMenu_setDefaultList .=
',ts_analyzer_checkLinenum,ts_analyzer_checkSyntax';
46 'ts_analyzer_checkSetup' =>
'1',
47 'ts_analyzer_checkConst' =>
'1',
48 'ts_analyzer_checkLinenum' =>
'1',
49 'ts_analyzer_checkComments' =>
'1',
50 'ts_analyzer_checkCrop' =>
'1',
51 'ts_analyzer_checkSyntax' =>
'1' 71 $GLOBALS[
'rootLine'] = $sys_page->getRootLine($pageId);
75 $GLOBALS[
'tplRow'] =
$GLOBALS[
'tmpl']->ext_getFirstTemplate($pageId, $template_uid);
93 $manyTemplatesMenu = $this->pObj->templateMenu();
95 if ($manyTemplatesMenu) {
96 $template_uid = $this->pObj->MOD_SETTINGS[
'templatesOnPage'];
103 if ($existTemplate) {
104 $theOutput .= $this->pObj->doc->section(
105 $GLOBALS[
'LANG']->getLL(
'currentTemplate', TRUE),
109 if ($manyTemplatesMenu) {
110 $theOutput .= $this->pObj->doc->section(
'', $manyTemplatesMenu);
112 $GLOBALS[
'tmpl']->clearList_const_temp = array_flip(
$GLOBALS[
'tmpl']->clearList_const);
113 $GLOBALS[
'tmpl']->clearList_setup_temp = array_flip(
$GLOBALS[
'tmpl']->clearList_setup);
114 $pointer = count(
$GLOBALS[
'tmpl']->hierarchyInfo);
115 $hierarchyInfo =
$GLOBALS[
'tmpl']->ext_process_hierarchyInfo(array(), $pointer);
116 $head =
'<thead><tr>';
117 $head .=
'<th>' .
$GLOBALS[
'LANG']->getLL(
'title', TRUE) .
'</th>';
118 $head .=
'<th>' .
$GLOBALS[
'LANG']->getLL(
'rootlevel', TRUE) .
'</th>';
119 $head .=
'<th>' .
$GLOBALS[
'LANG']->getLL(
'clearSetup', TRUE) .
'</th>';
120 $head .=
'<th>' .
$GLOBALS[
'LANG']->getLL(
'clearConstants', TRUE) .
'</th>';
121 $head .=
'<th>' .
$GLOBALS[
'LANG']->getLL(
'pid', TRUE) .
'</th>';
122 $head .=
'<th>' .
$GLOBALS[
'LANG']->getLL(
'rootline', TRUE) .
'</th>';
123 $head .=
'<th>' .
$GLOBALS[
'LANG']->getLL(
'nextLevel', TRUE) .
'</th>';
124 $head .=
'</tr></thead>';
125 $hierar = implode(array_reverse(
$GLOBALS[
'tmpl']->ext_getTemplateHierarchyArr($hierarchyInfo,
'', array(), 1)),
'');
126 $hierar =
'<table class="t3-table" id="ts-analyzer">' . $head . $hierar .
'</table>';
127 $theOutput .= $this->pObj->doc->spacer(5);
128 $theOutput .= $this->pObj->doc->section(
$GLOBALS[
'LANG']->getLL(
'templateHierarchy', TRUE), $hierar, 0, 1);
129 $urlParameters = array(
134 $completeLink =
'<p><a href="' . htmlspecialchars($aHref) .
'" class="t3-button">' .
$GLOBALS[
'LANG']->getLL(
'viewCompleteTS', TRUE) .
'</a></p>';
135 $theOutput .= $this->pObj->doc->spacer(5);
136 $theOutput .= $this->pObj->doc->section(
$GLOBALS[
'LANG']->getLL(
'completeTS', TRUE), $completeLink, 0, 1);
137 $theOutput .= $this->pObj->doc->spacer(15);
139 $theOutput .= $this->pObj->doc->section(
$GLOBALS[
'LANG']->getLL(
'displayOptions', TRUE),
'', FALSE, TRUE);
141 $theOutput .=
'<div class="tst-analyzer-options">' .
\TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->pObj->id,
'SET[ts_analyzer_checkLinenum]', $this->pObj->MOD_SETTINGS[
'ts_analyzer_checkLinenum'],
'', $addParams,
'id="checkTs_analyzer_checkLinenum"') .
'<label for="checkTs_analyzer_checkLinenum">' .
$GLOBALS[
'LANG']->getLL(
'lineNumbers', TRUE) .
'</label> ' .
\TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->pObj->id,
'SET[ts_analyzer_checkSyntax]', $this->pObj->MOD_SETTINGS[
'ts_analyzer_checkSyntax'],
'', $addParams,
'id="checkTs_analyzer_checkSyntax"') .
'<label for="checkTs_analyzer_checkSyntax">' .
$GLOBALS[
'LANG']->getLL(
'syntaxHighlight', TRUE) .
'</label> ' . (!$this->pObj->MOD_SETTINGS[
'ts_analyzer_checkSyntax'] ?
\TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->pObj->id,
'SET[ts_analyzer_checkComments]', $this->pObj->MOD_SETTINGS[
'ts_analyzer_checkComments'],
'', $addParams,
'id="checkTs_analyzer_checkComments"') .
'<label for="checkTs_analyzer_checkComments">' .
$GLOBALS[
'LANG']->getLL(
'comments', TRUE) .
'</label> ' .
\TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->pObj->id,
'SET[ts_analyzer_checkCrop]', $this->pObj->MOD_SETTINGS[
'ts_analyzer_checkCrop'],
'', $addParams,
'id="checkTs_analyzer_checkCrop"') .
'<label for="checkTs_analyzer_checkCrop">' .
$GLOBALS[
'LANG']->getLL(
'cropLines', TRUE) .
'</label> ' :
'') .
'</div>';
142 $theOutput .= $this->pObj->doc->spacer(25);
145 $theOutput .= $this->pObj->doc->section(
$GLOBALS[
'LANG']->getLL(
'constants', TRUE),
'', 0, 1);
146 $theOutput .= $this->pObj->doc->sectionEnd();
148 <table class="t3-table ts-typoscript"> 151 $GLOBALS[
'tmpl']->ext_lineNumberOffset = 0;
152 $GLOBALS[
'tmpl']->ext_lineNumberOffset_mode =
'const';
153 foreach (
$GLOBALS[
'tmpl']->constants as $key => $val) {
154 $currentTemplateId =
$GLOBALS[
'tmpl']->hierarchyInfo[$key][
'templateID'];
158 <td><strong>' . htmlspecialchars(
$GLOBALS[
'tmpl']->hierarchyInfo[$key][
'title']) .
'</strong></td> 162 <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td nowrap="nowrap">' .
$GLOBALS[
'tmpl']->ext_outputTS(array($val), $this->pObj->MOD_SETTINGS[
'ts_analyzer_checkLinenum'], $this->pObj->MOD_SETTINGS[
'ts_analyzer_checkComments'], $this->pObj->MOD_SETTINGS[
'ts_analyzer_checkCrop'], $this->pObj->MOD_SETTINGS[
'ts_analyzer_checkSyntax'], 0) .
'</td></tr></table> 170 $GLOBALS[
'tmpl']->ext_lineNumberOffset += count(explode(LF, $val)) + 1;
178 $theOutput .= $this->pObj->doc->spacer(15);
179 $theOutput .= $this->pObj->doc->section(
$GLOBALS[
'LANG']->getLL(
'setup', TRUE),
'', 0, 1);
180 $theOutput .= $this->pObj->doc->sectionEnd();
182 <table class="t3-table ts-typoscript"> 184 $GLOBALS[
'tmpl']->ext_lineNumberOffset = 0;
185 $GLOBALS[
'tmpl']->ext_lineNumberOffset_mode =
'setup';
186 foreach (
$GLOBALS[
'tmpl']->config as $key => $val) {
187 $currentTemplateId =
$GLOBALS[
'tmpl']->hierarchyInfo[$key][
'templateID'];
191 <td><strong>' . htmlspecialchars(
$GLOBALS[
'tmpl']->hierarchyInfo[$key][
'title']) .
'</strong></td></tr> 193 <td><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td nowrap="nowrap">' .
$GLOBALS[
'tmpl']->ext_outputTS(array($val), $this->pObj->MOD_SETTINGS[
'ts_analyzer_checkLinenum'], $this->pObj->MOD_SETTINGS[
'ts_analyzer_checkComments'], $this->pObj->MOD_SETTINGS[
'ts_analyzer_checkCrop'], $this->pObj->MOD_SETTINGS[
'ts_analyzer_checkSyntax'], 0) .
'</td></tr></table> 201 $GLOBALS[
'tmpl']->ext_lineNumberOffset += count(explode(LF, $val)) + 1;
static getFuncCheck($mainParams, $elementName, $currentValue, $script='', $addParams='', $tagParams='')
static makeInstance($className)
static getSpriteIconForRecord($table, array $row, array $options=array())
static getModuleUrl($moduleName, $urlParameters=array(), $backPathOverride=FALSE, $returnAbsoluteUrl=FALSE)
initialize_editor($pageId, $template_uid=0)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]