mirror of
https://github.com/werkraum-media/thuecat.git
synced 2024-12-04 19:16:13 +01:00
Allow configuring API key on site level
This commit is contained in:
parent
594a9f1261
commit
7386a0601a
2 changed files with 39 additions and 0 deletions
25
Configuration/SiteConfiguration/Overrides/sites.php
Normal file
25
Configuration/SiteConfiguration/Overrides/sites.php
Normal 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');
|
14
Resources/Private/Language/locallang_be.xlf
Normal file
14
Resources/Private/Language/locallang_be.xlf
Normal 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>
|
Loading…
Reference in a new issue