Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sg_news
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TYPO3
sg_news
Commits
77e580bf
Commit
77e580bf
authored
8 years ago
by
Stefan Galinski
Browse files
Options
Downloads
Patches
Plain Diff
[BUGFIX] Fix deprecated usage of the sprite manager
parent
5e038abb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ext_tables.php
+32
-21
32 additions, 21 deletions
ext_tables.php
with
32 additions
and
21 deletions
ext_tables.php
+
32
−
21
View file @
77e580bf
...
...
@@ -33,6 +33,13 @@ TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'LLL:EXT:sg_news/Resources/Private/Language/locallang_backend.xlf:titlePageBrowserPlugin'
);
// Removal of the unused plugin setting fields
$TCA
[
'tt_content'
][
'types'
][
'list'
][
'subtypes_excludelist'
][
'sgnews_overview'
]
=
'select_key,pages,recursive'
;
$TCA
[
'tt_content'
][
'types'
][
'list'
][
'subtypes_excludelist'
][
'sgnews_listbycategory'
]
=
'select_key,pages,recursive'
;
$TCA
[
'tt_content'
][
'types'
][
'list'
][
'subtypes_excludelist'
][
'sgnews_latest'
]
=
'select_key,pages,recursive'
;
$TCA
[
'tt_content'
][
'types'
][
'list'
][
'subtypes_excludelist'
][
'sgnews_singleview'
]
=
'select_key,pages,recursive'
;
$TCA
[
'tt_content'
][
'types'
][
'list'
][
'subtypes_excludelist'
][
'sgnews_pagebrowser'
]
=
'select_key,pages,recursive'
;
// Flex form assignment
$pluginSignature
=
str_replace
(
'_'
,
''
,
'sg_news'
)
.
'_overview'
;
$TCA
[
'tt_content'
][
'types'
][
'list'
][
'subtypes_addlist'
][
$pluginSignature
]
=
'pi_flexform'
;
...
...
@@ -52,18 +59,21 @@ $TCA['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_
$pluginSignature
,
'FILE:EXT:sg_news/Configuration/FlexForms/Latest.xml'
);
// Define the new doktypes
/** @var \TYPO3\CMS\Core\Imaging\IconRegistry $iconRegistry */
$iconRegistry
=
\TYPO3\CMS\Core\Utility\GeneralUtility
::
makeInstance
(
\TYPO3\CMS\Core\Imaging\IconRegistry
::
class
);
$relativeExtensionPath
=
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility
::
extRelPath
(
'sg_news'
);
###################################
### Define the Category Doktype ###
###################################
$relativeExtensionPath
=
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility
::
extRelPath
(
'sg_news'
);
$customPageDoktype
=
117
;
$customPageIcon
=
$relativeExtensionPath
.
'Resources/Public/Images/Category.png'
;
// add the new doktype to the list of page types
$GLOBALS
[
'PAGES_TYPES'
][
$customPageDoktype
]
=
[
'type'
=>
'sys'
,
'icon'
=>
$customPageIcon
,
'icon'
=>
'EXT:sg_news/Resources/Public/Images/Category.png'
,
'allowedTables'
=>
'*'
,
];
...
...
@@ -71,18 +81,23 @@ $GLOBALS['PAGES_TYPES'][$customPageDoktype] = [
$GLOBALS
[
'TCA'
][
'pages'
][
'columns'
][
'doktype'
][
'config'
][
'items'
][]
=
[
'LLL:EXT:sg_news/Resources/Private/Language/locallang_backend.xlf:pageType.category'
,
$customPageDoktype
,
$customPageIcon
'EXT:sg_news/Resources/Public/Images/Category.png'
];
// also add the new doktype to the page language overlays type selector (so that translations can inherit the same type)
$GLOBALS
[
'TCA'
][
'pages_language_overlay'
][
'columns'
][
'doktype'
][
'config'
][
'items'
][]
=
[
'LLL:EXT:sg_news/Resources/Private/Language/locallang_backend.xlf:pageType.category'
,
$customPageDoktype
,
$customPageIcon
'EXT:sg_news/Resources/Public/Images/Category.png'
];
// add the sprite icon for the new doktype
\TYPO3\CMS\Backend\Sprite\SpriteManager
::
addTcaTypeIcon
(
'pages'
,
$customPageDoktype
,
$customPageIcon
);
// register new icon
$iconRegistry
->
registerIcon
(
'tcarecords-pages-'
.
$customPageDoktype
,
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider
::
class
,
[
'source'
=>
'EXT:sg_news/Resources/Public/Images/Category.png'
]
);
$GLOBALS
[
'TCA'
][
'pages'
][
'ctrl'
][
'typeicon_classes'
][
$customPageDoktype
]
=
'tcarecords-pages-'
.
$customPageDoktype
;
// add the new doktype to the list of types available from the new page menu at the top of the page tree
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility
::
addUserTSConfig
(
...
...
@@ -93,14 +108,12 @@ $GLOBALS['TCA']['pages_language_overlay']['columns']['doktype']['config']['items
### Define the News Doktype ###
###############################
$relativeExtensionPath
=
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility
::
extRelPath
(
'sg_news'
);
$customPageDoktype
=
116
;
$customPageIcon
=
$relativeExtensionPath
.
'Resources/Public/Images/News.png'
;
// add the new doktype to the list of page types
$GLOBALS
[
'PAGES_TYPES'
][
$customPageDoktype
]
=
[
'type'
=>
'sys'
,
'icon'
=>
$customPageIcon
,
'icon'
=>
'EXT:sg_news/Resources/Public/Images/News.png'
,
'allowedTables'
=>
'*'
,
];
...
...
@@ -108,27 +121,25 @@ $GLOBALS['PAGES_TYPES'][$customPageDoktype] = [
$GLOBALS
[
'TCA'
][
'pages'
][
'columns'
][
'doktype'
][
'config'
][
'items'
][]
=
[
'LLL:EXT:sg_news/Resources/Private/Language/locallang_backend.xlf:pageType.news'
,
$customPageDoktype
,
$customPageIcon
'EXT:sg_news/Resources/Public/Images/News.png'
];
// also add the new doktype to the page language overlays type selector (so that translations can inherit the same type)
$GLOBALS
[
'TCA'
][
'pages_language_overlay'
][
'columns'
][
'doktype'
][
'config'
][
'items'
][]
=
[
'LLL:EXT:sg_news/Resources/Private/Language/locallang_backend.xlf:pageType.news'
,
$customPageDoktype
,
$customPageIcon
'EXT:sg_news/Resources/Public/Images/News.png'
];
// add the sprite icon for the new doktype
\TYPO3\CMS\Backend\Sprite\SpriteManager
::
addTcaTypeIcon
(
'pages'
,
$customPageDoktype
,
$customPageIcon
);
// register new icon
$iconRegistry
->
registerIcon
(
'tcarecords-pages-'
.
$customPageDoktype
,
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider
::
class
,
[
'source'
=>
'EXT:sg_news/Resources/Public/Images/News.png'
]
);
$GLOBALS
[
'TCA'
][
'pages'
][
'ctrl'
][
'typeicon_classes'
][
$customPageDoktype
]
=
'tcarecords-pages-'
.
$customPageDoktype
;
// add the new doktype to the list of types available from the new page menu at the top of the page tree
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility
::
addUserTSConfig
(
'options.pageTree.doktypesToShowInNewPageDragArea := addToList('
.
$customPageDoktype
.
')'
);
// Removal of the unused plugin setting fields
$TCA
[
'tt_content'
][
'types'
][
'list'
][
'subtypes_excludelist'
][
'sgnews_overview'
]
=
'select_key,pages,recursive'
;
$TCA
[
'tt_content'
][
'types'
][
'list'
][
'subtypes_excludelist'
][
'sgnews_listbycategory'
]
=
'select_key,pages,recursive'
;
$TCA
[
'tt_content'
][
'types'
][
'list'
][
'subtypes_excludelist'
][
'sgnews_latest'
]
=
'select_key,pages,recursive'
;
?>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment