Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
TYPO3
languagevisibility
Commits
cdc20706
Commit
cdc20706
authored
Jun 15, 2020
by
Fabio Stegmeyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TASK] Add custom record title userfunc (for log, the title before was "[Kein Titel]")
parent
d0aca821
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
1 deletion
+43
-1
Classes/UserFunction/Tca.php
Classes/UserFunction/Tca.php
+42
-0
Configuration/TCA/tx_languagevisibility_visibility_flag.php
Configuration/TCA/tx_languagevisibility_visibility_flag.php
+1
-1
No files found.
Classes/UserFunction/Tca.php
0 → 100644
View file @
cdc20706
<?php
namespace
TYPO3\Languagevisibility\UserFunction
;
/***************************************************************
* Copyright notice
*
* (c) 2007 AOE media (dev@aoemedia.de)
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* User Functions to render custom title
*/
class
Tca
{
public
function
customTitle
(
&
$parameters
,
$parentObject
)
{
$recordTable
=
$parameters
[
'row'
][
'record_table'
];
$recordUid
=
str_replace
(
$recordTable
.
'_'
,
''
,
$parameters
[
'row'
][
'record_uid'
]);
$recordLanguageUid
=
$parameters
[
'row'
][
'record_language_uid'
];
$flag
=
$parameters
[
'row'
][
'flag'
];
$parameters
[
'title'
]
=
$recordTable
.
' :: '
.
$recordUid
.
' :: '
.
$recordLanguageUid
.
' :: '
.
$flag
;
}
}
Configuration/TCA/tx_languagevisibility_visibility_flag.php
View file @
cdc20706
<?php
return
[
'ctrl'
=>
[
'label_userFunc'
=>
'TYPO3\\Languagevisibility\\UserFunction\\Tca->customTitle'
,
'tstamp'
=>
'tstamp'
,
'crdate'
=>
'crdate'
,
'cruser_id'
=>
'cruser_id'
,
...
...
@@ -44,5 +45,4 @@ return [
]
],
],
];
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