mirror of
https://github.com/SkillDisplay/TYPO3ContentElements.git
synced 2024-12-28 08:46:08 +01:00
Daniel Siepmann
e967112277
Allow editors to add new content element "skills". The element contains an input for a comma separated list of skill IDs. A preview in backend is shown. Frontend rendering is provided.
37 lines
1.4 KiB
PHP
37 lines
1.4 KiB
PHP
<?php
|
|
|
|
(function (string $extensionKey, string $tableName) {
|
|
$languagePath = 'LLL:EXT:' . $extensionKey . '/Resources/Private/Language/locallang_tca.xlf:' . $tableName . '.';
|
|
|
|
\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA'][$tableName], [
|
|
'columns' => [
|
|
'CType' => [
|
|
'config' => [
|
|
'itemGroups' => [
|
|
'skilldisplay' => $languagePath . 'CType.itemGroups.skilldisplay',
|
|
],
|
|
],
|
|
],
|
|
'skilldisplay_skills' => [
|
|
'exclude' => 1,
|
|
'label' => $languagePath . 'skilldisplay_skills',
|
|
'description' => $languagePath . 'skilldisplay_skills.description',
|
|
'config' => [
|
|
'type' => 'input',
|
|
'eval' => 'required',
|
|
'size' => 10,
|
|
],
|
|
],
|
|
'skilldisplay_skillset' => [
|
|
'exclude' => 1,
|
|
'label' => $languagePath . 'skilldisplay_skillset',
|
|
'description' => $languagePath . 'skilldisplay_skillset.description',
|
|
'config' => [
|
|
'type' => 'input',
|
|
'eval' => 'int,required',
|
|
'size' => 10,
|
|
],
|
|
],
|
|
],
|
|
]);
|
|
})('skilldisplay', 'tt_content');
|