[TASK] Provide uid in ElementInformation popup 14/54214/2
authorGeorg Ringer <georg.ringer@gmail.com>
Wed, 20 Sep 2017 18:39:19 +0000 (20:39 +0200)
committerBenni Mack <benni@typo3.org>
Tue, 26 Sep 2017 04:47:43 +0000 (06:47 +0200)
The uid of a record is an important information and should
be provided as well.

Resolves: #82526
Releases: master, 8.7
Change-Id: Ic44ca6a24e21c09ced78203ed4a73907906bf568
Reviewed-on: https://review.typo3.org/54214
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php

index 2468088..dd2f562 100644 (file)
@@ -321,9 +321,12 @@ class ElementInformationController
     protected function getPropertiesForTable() : array
     {
         $propertiesForTable = [];
-        $extraFields = [];
-
         $lang = $this->getLanguageService();
+
+        $extraFields = [
+            'uid' => htmlspecialchars($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:show_item.php.uid'))
+        ];
+
         if (in_array($this->type, ['folder', 'file'], true)) {
             if ($this->type === 'file') {
                 $extraFields['creation_date'] = htmlspecialchars($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.creationDate'));
@@ -344,7 +347,7 @@ class ElementInformationController
             foreach ($extraFields as $fieldName => $fieldLabel) {
                 if (isset($GLOBALS['TCA'][$this->table]['ctrl'][$fieldName])) {
                     $extraFields[$GLOBALS['TCA'][$this->table]['ctrl'][$fieldName]] = $fieldLabel;
-                } else {
+                } elseif ($fieldName !== 'uid') {
                     unset($extraFields[$fieldName]);
                 }
             }