Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
lfeditor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
12
Issues
12
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TYPO3
lfeditor
Commits
6ca0b499
Commit
6ca0b499
authored
Mar 17, 2015
by
damjan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FEATURE] Adds extension groups in select list (Local, System)
parent
73fc07e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
5 deletions
+21
-5
Classes/Controller/AbstractController.php
Classes/Controller/AbstractController.php
+20
-4
Classes/Utility/Functions.php
Classes/Utility/Functions.php
+1
-1
No files found.
Classes/Controller/AbstractController.php
View file @
6ca0b499
...
...
@@ -184,18 +184,34 @@ abstract class AbstractController extends ActionController {
$extensions
=
$cacheManager
->
getCache
(
'lfeditor_select_options_cache'
)
->
get
(
'extensionAndLangFileOptions'
);
if
(
empty
(
$extensions
))
{
$extensionOptions
=
$this
->
configurationService
->
menuExtList
();
$extensionGroupCount
=
0
;
foreach
(
$extensionOptions
as
$extAddress
=>
$extLabel
)
{
$extension
[
'extLabel'
]
=
$extLabel
;
$extension
[
'languageFileOptions'
]
=
array
();
$isExtensionGroupStart
=
$extAddress
===
'###extensionGroup###'
.
$extLabel
;
try
{
$extension
[
'languageFileOptions'
]
=
$this
->
configurationService
->
menuLangFileList
(
$extAddress
);
if
(
empty
(
$extension
[
'languageFileOptions'
]))
{
continue
;
if
(
!
$isExtensionGroupStart
)
{
$extension
[
'languageFileOptions'
]
=
$this
->
configurationService
->
menuLangFileList
(
$extAddress
);
if
(
empty
(
$extension
[
'languageFileOptions'
]))
{
continue
;
}
}
elseif
(
++
$extensionGroupCount
>
1
)
{
$extensions
[
$extAddress
.
'EmptySpaceBefore'
]
=
array
(
'extLabel'
=>
''
,
'languageFileOptions'
=>
array
(),
);
}
}
catch
(
LFException
$e
)
{
continue
;
}
$extensions
[
$extAddress
]
=
$extension
;
if
(
$isExtensionGroupStart
)
{
$extensions
[
$extAddress
.
'DelimiterAfter'
]
=
array
(
'extLabel'
=>
'======'
,
'languageFileOptions'
=>
array
(),
);
}
}
$cacheManager
->
getCache
(
'lfeditor_select_options_cache'
)
->
set
(
'extensionAndLangFileOptions'
,
$extensions
);
}
...
...
Classes/Utility/Functions.php
View file @
6ca0b499
...
...
@@ -64,7 +64,7 @@ class Functions {
$prepArray
[
$extPath
]
=
basename
(
$extPath
)
.
' ['
.
$state
.
']'
;
}
ksort
(
$prepArray
);
$myArray
=
array_merge
(
$myArray
,
$prepArray
);
$myArray
=
array_merge
(
$myArray
,
array
(
'###extensionGroup###'
.
$header
=>
$header
),
$prepArray
);
}
return
$myArray
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment