Skip to content

Commit

Permalink
Merge pull request #13 from t3brightside/main
Browse files Browse the repository at this point in the history
[FEATURE] add icons to sys_category and sys_file_collection
  • Loading branch information
stephankellermayr authored Jan 26, 2024
2 parents 99e445f + 50035ec commit f494765
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Configuration/TCA/Overrides/sys_category.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

defined('TYPO3') || die();

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns(
'sys_category',
[
'category_icon' => [
'exclude' => 1,
'label' => 'LLL:EXT:iconpack/Resources/Private/Language/locallang_be.xlf:tt_content.header_icon',
'config' => [
'type' => 'user',
'renderType' => 'IconpackWizard',
]
],

]
);

// Add custom field to TCA
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
'sys_category',
'category_icon',
'',
'after:title'
);
26 changes: 26 additions & 0 deletions Configuration/TCA/Overrides/sys_file_collection.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

defined('TYPO3') || die();

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns(
'sys_file_collection',
[
'collection_icon' => [
'exclude' => 1,
'label' => 'LLL:EXT:iconpack/Resources/Private/Language/locallang_be.xlf:tt_content.header_icon',
'config' => [
'type' => 'user',
'renderType' => 'IconpackWizard',
]
],

]
);

// Add custom field to TCA
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
'sys_file_collection',
'collection_icon',
'',
'after:title'
);
14 changes: 14 additions & 0 deletions ext_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,17 @@ CREATE TABLE tt_content (
CREATE TABLE pages (
page_icon varchar(120) DEFAULT '' NOT NULL,
);

#
# Table structure for table 'sys_category'
#
CREATE TABLE sys_category (
category_icon varchar(120) DEFAULT '' NOT NULL,
);

#
# Table structure for table 'sys_file_collection'
#
CREATE TABLE sys_file_collection (
collection_icon varchar(120) DEFAULT '' NOT NULL,
);

0 comments on commit f494765

Please sign in to comment.