Allow configuring API key on site level

This commit is contained in:
Daniel Siepmann 2021-02-01 09:36:44 +01:00
parent 594a9f1261
commit 7386a0601a
2 changed files with 39 additions and 0 deletions

View file

@ -0,0 +1,25 @@
<?php
(static function (string $extensionKey, string $tableName) {
$languagePath = 'LLL:EXT:' . $extensionKey . '/Resources/Private/Language/locallang_be.xlf:' . $tableName . '.';
\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['SiteConfiguration']['site'], [
'columns' => [
'thuecat_api_key' => [
'label' => $languagePath . 'thuecat_api_key',
'config' => [
'type' => 'input',
],
],
],
'types' => [
'0' => [
'showitem' => $GLOBALS['SiteConfiguration']['site']['types']['0']['showitem']
. ', ' . implode(',', [
'--div--;' . $languagePath . 'div.thuecat',
'thuecat_api_key',
]),
],
],
]);
})('thuecat', 'site');

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en" datatype="plaintext" original="messages" date="2021-02-01T09:24:10Z" product-name="Resources">
<header/>
<body>
<trans-unit id="site.div.thuecat" xml:space="preserve">
<source>ThüCAT</source>
</trans-unit>
<trans-unit id="site.thuecat_api_key" xml:space="preserve">
<source>API Key</source>
</trans-unit>
</body>
</file>
</xliff>