Skip to content

Commit

Permalink
🔧 add displayInfoInPageModule config
Browse files Browse the repository at this point in the history
  • Loading branch information
Kanti committed Nov 5, 2021
1 parent 1dc250a commit 31a5a1d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/Hooks/PageHeaderHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ public function render(): string
{
$pageId = (int)$_GET['id'];
$hasAccess = $GLOBALS['BE_USER']->check('non_exclude_fields', 'pages:tx_webvitalstracker_measure');
$disableInfo = (bool)($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['web_vitals_tracker']['disableInfo'] ?? false);
$displayInfoInPageModule = (bool)($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['web_vitals_tracker']['displayInfoInPageModule'] ?? true);

if (!$hasAccess || $disableInfo) {
if (!$hasAccess || !$displayInfoInPageModule) {
return '';
}

Expand Down
4 changes: 4 additions & 0 deletions Resources/Private/Language/locallang.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
<trans-unit id="widgets.fastestPages.description">
<source>See the fastest Pages of the whole TYPO3 Installation</source>
</trans-unit>

<trans-unit id="config.displayInfoInPageModule">
<source>Display Info in PageModule</source>
</trans-unit>
</body>
</file>
</xliff>
2 changes: 2 additions & 0 deletions ext_conf_template.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# cat=basic/enable; type=boolean; label=LLL:EXT:web_vitals_tracker/Resources/Private/Language/locallang.xlf:config.displayInfoInPageModule
displayInfoInPageModule = 1

0 comments on commit 31a5a1d

Please sign in to comment.