mirror of
https://github.com/werkraum-media/watchlist.git
synced 2024-11-21 23:56:09 +01:00
Add basic ce setup (#5)
Co-authored-by: Dirk Koritnik <koritnik@werkraum-media.de>
This commit is contained in:
parent
64c230589f
commit
bdc1572297
7 changed files with 123 additions and 23 deletions
|
@ -4,11 +4,60 @@ use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
|
|||
|
||||
defined('TYPO3') || die();
|
||||
|
||||
ExtensionUtility::registerPlugin(
|
||||
'Watchlist',
|
||||
'Watchlist',
|
||||
'LLL:EXT:watchlist/Resources/Private/Language/locallang.xlf:plugin.watchlist',
|
||||
'EXT:watchlist/Resources/Public/Icons/Extension.svg'
|
||||
);
|
||||
(static function (string $extKey, string $table, string $contentType) {
|
||||
$languagePath = implode(':', [
|
||||
'LLL',
|
||||
'EXT',
|
||||
$extKey . '/Resources/Private/Language/locallang.xlf',
|
||||
$table . '.' . $contentType . '.',
|
||||
]);
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['watchlist_watchlist'] = 'recursive,select_key,pages';
|
||||
ExtensionUtility::registerPlugin(
|
||||
$extKey,
|
||||
$extKey,
|
||||
$languagePath . 'title',
|
||||
'EXT:' . $extKey . '/Resources/Public/Icons/Extension.svg'
|
||||
);
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
$table,
|
||||
'CType',
|
||||
[
|
||||
$languagePath . 'title',
|
||||
$contentType,
|
||||
'content-bullets',
|
||||
'special',
|
||||
]
|
||||
);
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA'][$table], [
|
||||
'ctrl' => [
|
||||
'typeicon_classes' => [
|
||||
$contentType => 'content-bullets',
|
||||
],
|
||||
],
|
||||
'types' => [
|
||||
$contentType => [
|
||||
'showitem' => implode(',', [
|
||||
'--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general',
|
||||
'--palette--;;general',
|
||||
'--palette--;;headers',
|
||||
'--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance',
|
||||
'--palette--;;frames',
|
||||
'--palette--;;appearanceLinks',
|
||||
'--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language',
|
||||
'--palette--;;language',
|
||||
'--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access',
|
||||
'--palette--;;hidden',
|
||||
'--palette--;;access',
|
||||
'--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:categories',
|
||||
'--div--;LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_category.tabs.category',
|
||||
'categories',
|
||||
'--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:notes',
|
||||
'rowDescription',
|
||||
'--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:extended',
|
||||
]),
|
||||
],
|
||||
],
|
||||
]);
|
||||
})('watchlist', 'tt_content', 'watchlist_watchlist');
|
||||
|
|
16
Configuration/TSconfig/Page/Default.tsconfig
Normal file
16
Configuration/TSconfig/Page/Default.tsconfig
Normal file
|
@ -0,0 +1,16 @@
|
|||
mod.wizards.newContentElement.wizardItems.special {
|
||||
elements {
|
||||
watchlist {
|
||||
iconIdentifier = content-bullets
|
||||
title = LLL:EXT:watchlist/Resources/Private/Language/locallang.xlf:tt_content.watchlist_watchlist.title
|
||||
description = LLL:EXT:watchlist/Resources/Private/Language/locallang.xlf:tt_content.watchlist_watchlist.description
|
||||
tt_content_defValues {
|
||||
CType = watchlist_watchlist
|
||||
header = Watchlist
|
||||
header_layout = 100
|
||||
}
|
||||
}
|
||||
}
|
||||
show := addToList(watchlist)
|
||||
}
|
||||
|
24
Resources/Private/Language/de.locallang.xlf
Normal file
24
Resources/Private/Language/de.locallang.xlf
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<file target-language="de" source-language="en" datatype="plaintext" original="messages" date="2022-09-26T10:43:30Z" product-name="Watchlist">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="headline.index" xml:space="preserve">
|
||||
<source>Watchlist</source>
|
||||
<target>Merkliste</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="text.watchlist.isEmpty" xml:space="preserve">
|
||||
<source>Watchlist is empty</source>
|
||||
<target>Merkliste ist leer</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tt_content.watchlist_watchlist.title" xml:space="preserve">
|
||||
<source>Watchlist</source>
|
||||
<target>Merkliste</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tt_content.watchlist_watchlist.description" xml:space="preserve">
|
||||
<source>Content element to show Watchlist items</source>
|
||||
<target>Inhaltselement zur Darstellung von Merklisteneinträgen</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -9,6 +9,12 @@
|
|||
<trans-unit id="text.watchlist.isEmpty" xml:space="preserve">
|
||||
<source>Watchlist is empty</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tt_content.watchlist_watchlist.title" xml:space="preserve">
|
||||
<source>Watchlist</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tt_content.watchlist_watchlist.description" xml:space="preserve">
|
||||
<source>Content element to show Watchlist items</source>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
|
|
|
@ -1,22 +1,9 @@
|
|||
base: /
|
||||
languages:
|
||||
-
|
||||
title: Deutsch
|
||||
enabled: true
|
||||
base: /
|
||||
typo3Language: de
|
||||
locale: de_DE.UTF-8
|
||||
iso-639-1: de
|
||||
navigationTitle: Deutsch
|
||||
hreflang: de-DE
|
||||
direction: ''
|
||||
flag: de
|
||||
websiteTitle: ''
|
||||
languageId: 0
|
||||
-
|
||||
title: English
|
||||
enabled: true
|
||||
base: /en
|
||||
base: /
|
||||
typo3Language: default
|
||||
locale: en_GB.UTF-8
|
||||
iso-639-1: en
|
||||
|
@ -25,8 +12,21 @@ languages:
|
|||
hreflang: en-GB
|
||||
direction: ''
|
||||
flag: gb
|
||||
languageId: 1
|
||||
languageId: 0
|
||||
fallbackType: strict
|
||||
fallbacks: '0'
|
||||
-
|
||||
title: Deutsch
|
||||
enabled: true
|
||||
base: /de
|
||||
typo3Language: de
|
||||
locale: de_DE.UTF-8
|
||||
iso-639-1: de
|
||||
navigationTitle: Deutsch
|
||||
hreflang: de-DE
|
||||
direction: ''
|
||||
flag: de
|
||||
websiteTitle: ''
|
||||
languageId: 1
|
||||
rootPageId: 1
|
||||
websiteTitle: 'Example Website'
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
|
||||
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
|
||||
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
|
||||
use WerkraumMedia\Watchlist\Controller\WatchlistController;
|
||||
use WerkraumMedia\Watchlist\Extbase\TypeConverter\ItemTypeConverter;
|
||||
|
@ -22,4 +23,7 @@ defined('TYPO3') || die('Access denied.');
|
|||
|
||||
ExtensionUtility::registerTypeConverter(WatchlistTypeConverter::class);
|
||||
ExtensionUtility::registerTypeConverter(ItemTypeConverter::class);
|
||||
ExtensionManagementUtility::addPageTSConfig(
|
||||
"@import 'EXT:watchlist/Configuration/TSconfig/Page/Default.tsconfig'"
|
||||
);
|
||||
})();
|
||||
|
|
|
@ -32,7 +32,8 @@ let
|
|||
project-install
|
||||
xmllint --schema vendor/phpunit/phpunit/phpunit.xsd --noout phpunit.xml.dist
|
||||
wget --no-check-certificate https://docs.oasis-open.org/xliff/v1.2/os/xliff-core-1.2-strict.xsd --output-document=xliff-core-1.2-strict.xsd
|
||||
xmllint --schema xliff-core-1.2-strict.xsd --noout "$(find Resources -name '*.xlf')"
|
||||
# shellcheck disable=SC2046
|
||||
xmllint --schema xliff-core-1.2-strict.xsd --noout $(find Resources -name '*.xlf')
|
||||
'';
|
||||
};
|
||||
projectCodingGuideline = pkgs.writeShellApplication {
|
||||
|
|
Loading…
Reference in a new issue