protected $pageRenderer;
/**
- * @var string $resPath Path to "linkvalidator/res/" to be used in pageRenderer
- */
- protected $resPath = '';
-
- /**
* @var \TYPO3\CMS\Linkvalidator\Linktype\LinktypeInterface[]
*/
protected $hookObjectsArr = array();
* @return string Module content
*/
public function main() {
- $GLOBALS['LANG']->includeLLFile('EXT:linkvalidator/modfuncreport/locallang.xml');
+ $GLOBALS['LANG']->includeLLFile('EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf');
$this->searchLevel = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('search_levels');
if (isset($this->pObj->id)) {
$this->modTS = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($this->pObj->id, 'mod.linkvalidator');
}
$GLOBALS['BE_USER']->pushModuleData('web_info', $this->pObj->MOD_SETTINGS);
$this->initialize();
- // Setting up the context sensitive menu
- $this->resPath = $this->doc->backPath . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('linkvalidator') . 'res/';
+
$this->pageRenderer = $this->doc->getPageRenderer();
// Localization
- $this->pageRenderer->addInlineLanguageLabelFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('linkvalidator', 'modfuncreport/locallang.xml'));
+ $this->pageRenderer->addInlineLanguageLabelFile(
+ \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('linkvalidator', 'Resources/Private/Language/Module/locallang.xlf')
+ );
$this->pageRenderer->addJsInlineCode('linkvalidator', 'function toggleActionButton(prefix) {
var buttonDisable = true;
Ext.select(\'.\' + prefix ,false).each(function(checkBox,i){
if ($this->modTS['showCheckLinkTab'] == 1) {
$this->updateListHtml = '<input type="submit" name="updateLinkList" id="updateLinkList" value="' . $GLOBALS['LANG']->getLL('label_update') . '"/>';
}
- $this->refreshListHtml = '<input type="submit" name="refreshLinkList" id="refreshLinkList" value="' . $GLOBALS['LANG']->getLL('label_refresh') . '"/>';
+ $this->refreshListHtml = '<input type="submit" name="refreshLinkList" id="refreshLinkList" value="' . $GLOBALS['LANG']->getLL('label_refresh') . '"/>';
$this->processor = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Linkvalidator\\LinkAnalyzer');
$this->updateBrokenLinks();
$brokenLinkOverView = $this->processor->getLinkCounts($this->pObj->id);
protected function createTabs() {
$panelCheck = '';
if ($this->modTS['showCheckLinkTab'] == 1) {
- $panelCheck = '{
+ $panelCheck = ',
+ {
title: TYPO3.l10n.localize(\'CheckLink\'),
html: ' . json_encode($this->flush()) . ',
}';
autoHeight: true,
title: TYPO3.l10n.localize(\'Report\'),
html: ' . json_encode($this->flush(TRUE)) . '
- },
- ' . $panelCheck . '
+ }' . $panelCheck . '
]
});
}
$this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
$this->doc->backPath = $GLOBALS['BACK_PATH'];
- $this->doc->setModuleTemplate(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('linkvalidator') . 'modfuncreport/mod_template.html');
+ $this->doc->setModuleTemplate(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('linkvalidator') . 'Resources/Private/Templates/mod_template.html');
$this->relativePath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('linkvalidator');
$this->pageRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess($this->pObj->id, $GLOBALS['BE_USER']->getPagePermsClause(1));
$this->isAccessibleForCurrentUser = FALSE;
// Build level selector
$opt = array();
$parts = array(
- 0 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_0'),
- 1 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_1'),
- 2 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_2'),
- 3 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_3'),
- 999 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_infi')
+ 0 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_0'),
+ 1 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_1'),
+ 2 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_2'),
+ 3 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_3'),
+ 999 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_infi')
);
foreach ($parts as $kv => $label) {
$opt[] = '<option value="' . $kv . '"' . ($kv == intval($this->searchLevel) ? ' selected="selected"' : '') . '>' . htmlspecialchars($label) . '</option>';
} else {
$brokenLinksMarker = $this->getNoBrokenLinkMessage($brokenLinksMarker);
}
+ $GLOBALS['TYPO3_DB']->sql_free_result($res);
}
} else {
$brokenLinksMarker = $this->getNoBrokenLinkMessage($brokenLinksMarker);
*/
protected function getNoBrokenLinkMessage(array $brokenLinksMarker) {
$brokenLinksMarker['LIST_HEADER'] = $this->doc->sectionHeader($GLOBALS['LANG']->getLL('list.header'));
- /** @var \TYPO3\CMS\Core\Messaging\FlashMessage $message */
+ /** @var $message \TYPO3\CMS\Core\Messaging\FlashMessage */
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
$GLOBALS['LANG']->getLL('list.no.broken.links'),
}
$translation = $GLOBALS['LANG']->getLL('hooks.' . $type);
$translation = $translation ? $translation : $type;
- $option = '<input type="checkbox" ' . $additionalAttr . ' id="' . $prefix . 'SET_' . $type . '" name="' . $prefix . 'SET[' . $type . ']" value="1"' . ($this->pObj->MOD_SETTINGS[$type] ? ' checked="checked"' : '') . '/>' . '<label for="' . $prefix . 'SET[' . $type . ']">' . htmlspecialchars($translation) . '</label>';
+ $option = '<input type="checkbox" ' . $additionalAttr . ' id="' . $prefix . 'SET_' . $type . '" name="' . $prefix . 'SET[' . $type . ']" value="1"' . ($this->pObj->MOD_SETTINGS[$type] ? ' checked="checked"' : '') . '/>' . '<label for="' . $prefix . 'SET[' . $type . ']">' . htmlspecialchars($translation) . '</label>';
$hookSectionMarker['option'] = $option;
$hookSectionContent .= \TYPO3\CMS\Core\Html\HtmlParser::substituteMarkerArray(
$hookSectionTemplate,
* @return void
*/
protected function loadHeaderData() {
- $this->doc->addStyleSheet('linkvalidator', $this->relativePath . 'res/linkvalidator.css', 'linkvalidator');
+ $this->doc->addStyleSheet('linkvalidator', $this->relativePath . 'Resources/Public/Css/linkvalidator.css', 'linkvalidator');
$this->doc->getPageRenderer()->addJsFile($this->doc->backPath . '../t3lib/js/extjs/ux/Ext.ux.FitToParent.js');
}
}
-
?>
\ No newline at end of file