Commit cdc20706 authored by Fabio Stegmeyer's avatar Fabio Stegmeyer

[TASK] Add custom record title userfunc (for log, the title before was "[Kein Titel]")

parent d0aca821
<?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;
}
}
<?php
return [
'ctrl' => [
'label_userFunc' => 'TYPO3\\Languagevisibility\\UserFunction\\Tca->customTitle',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
......@@ -44,5 +45,4 @@ return [
]
],
],
];
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment