Skip to content

Commit

Permalink
[TASK] Improve TCA
Browse files Browse the repository at this point in the history
  • Loading branch information
ervaude committed Aug 22, 2020
1 parent 5f72fea commit 1cc52b9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Configuration/TCA/Overrides/tt_content.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@
'onChange' => 'reload',
'exclude' => true,
'label' => 'Programming Language',
'description' => 'Select the coding language so that the correct syntax highlighting can be applied in the frontend.',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'items' => \DanielGoerz\FsCodeSnippet\Utility\FsCodeSnippetConfigurationUtility::getItemArrayForTCA()
'items' => \DanielGoerz\FsCodeSnippet\Utility\FsCodeSnippetConfigurationUtility::getItemArrayForTCA(),
'default' => \DanielGoerz\FsCodeSnippet\Enumeration\CodeSnippetLanguage::PHP
]
]
];
Expand All @@ -37,10 +39,11 @@
// What fields should be displayed
$GLOBALS['TCA']['tt_content']['types']['fs_code_snippet'] = [
'showitem' => '
--palette--;' . $frontendLanguageFilePrefix . 'palette.general;general,
--palette--;' . $frontendLanguageFilePrefix . 'palette.header;header,
programming_language,pi_flexform,
bodytext,
--div--;' . $frontendLanguageFilePrefix . 'header,
--palette--;' . $frontendLanguageFilePrefix . 'palette.general;general,
--palette--;' . $frontendLanguageFilePrefix . 'palette.header;header,
--div--;' . $frontendLanguageFilePrefix . 'tabs.appearance,
layout;' . $frontendLanguageFilePrefix . 'layout_formlabel,
--palette--;' . $frontendLanguageFilePrefix . 'palette.appearanceLinks;appearanceLinks,
Expand All @@ -54,6 +57,7 @@
$GLOBALS['TCA']['tt_content']['types']['fs_code_snippet']['columnsOverrides'] = [
'bodytext' => [
'label' => 'Code Snippet',
'description' => 'Syntax highlighting in the backend is limited to PHP, JavaScript, CSS, TypoScript and HTMl. Full syntax highlighting will be applied in the frontend.',
'config' => [
'type' => 'text',
'renderType' => 'fs_code_snippet',
Expand Down

0 comments on commit 1cc52b9

Please sign in to comment.