[!!!][TASK] Use protocol in pages.url and migrate pages.urltype 98/53198/11
authorBenni Mack <benni@typo3.org>
Tue, 13 Jun 2017 11:01:44 +0000 (13:01 +0200)
committerAndreas Fernandez <typo3@scripting-base.de>
Fri, 25 Aug 2017 14:32:02 +0000 (16:32 +0200)
The field pages.urltype contains "0", "1", "2" which maps to a protocol,
however most people want to just paste the url in the "pages.url" field.

This change drops the DB field "pages.urltype" and merges the value
into "pages.url" directly.

Resolves: #71306
Releases: master
Change-Id: I309724ba48ac9c5674a75e79da6cbb6e4880e521
Reviewed-on: https://review.typo3.org/53198
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
15 files changed:
typo3/sysext/core/Configuration/TCA/pages.php
typo3/sysext/core/Documentation/Changelog/master/Breaking-71306-DroppedProtocolFieldFromPageTypeLinkToExternalURL.rst [new file with mode: 0644]
typo3/sysext/core/Resources/Private/Language/locallang_csh_pages.xlf
typo3/sysext/core/Tests/Functional/Tca/PagesVisibleFieldsTest.php
typo3/sysext/core/ext_tables.sql
typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php
typo3/sysext/frontend/Classes/Page/PageRepository.php
typo3/sysext/frontend/Configuration/TCA/pages_language_overlay.php
typo3/sysext/frontend/Resources/Private/Language/locallang_tca.xlf
typo3/sysext/frontend/Tests/Functional/Tca/PagesLanguageOverlayVisibleFieldsTest.php
typo3/sysext/frontend/Tests/Unit/Page/PageRepositoryTest.php
typo3/sysext/frontend/ext_tables.sql
typo3/sysext/install/Classes/Updates/MigrateUrlTypesInPagesUpdate.php [new file with mode: 0644]
typo3/sysext/install/Configuration/ExtensionScanner/Php/PropertyPublicMatcher.php
typo3/sysext/install/ext_localconf.php

index acaf14f..f827de8 100644 (file)
@@ -351,36 +351,6 @@ return [
                 'softref' => 'url'
             ]
         ],
-        'urltype' => [
-            'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.type',
-            'config' => [
-                'type' => 'select',
-                'renderType' => 'selectSingle',
-                'items' => [
-                    [
-                        'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.automatic',
-                        '0'
-                    ],
-                    [
-                        'http://',
-                        '1'
-                    ],
-                    [
-                        'https://',
-                        '4'
-                    ],
-                    [
-                        'ftp://',
-                        '2'
-                    ],
-                    [
-                        'mailto:',
-                        '3'
-                    ]
-                ],
-                'default' => 1
-            ]
-        ],
         'lastUpdated' => [
             'exclude' => true,
             'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.lastUpdated',
@@ -1003,7 +973,7 @@ return [
             'showitem' => 'mount_pid;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.mount_pid_formlabel',
         ],
         'external' => [
-            'showitem' => 'urltype;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.urltype_formlabel, url;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.url_formlabel',
+            'showitem' => 'url;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.url_formlabel',
         ],
         'title' => [
             'showitem' => 'title;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.title_formlabel, --linebreak--, nav_title;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.nav_title_formlabel, --linebreak--, subtitle;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.subtitle_formlabel',
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-71306-DroppedProtocolFieldFromPageTypeLinkToExternalURL.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-71306-DroppedProtocolFieldFromPageTypeLinkToExternalURL.rst
new file mode 100644 (file)
index 0000000..5927a89
--- /dev/null
@@ -0,0 +1,51 @@
+.. include:: ../../Includes.txt
+
+=================================================================================
+Breaking: #71306 - Dropped "Protocol" field from page type "Link to external URL"
+=================================================================================
+
+See :issue:`71306`
+
+Description
+===========
+
+When selecting the page type "External Url" the option to select the protocol / URL scheme for the
+external target has been dropped, and is now added directly to the external target field.
+
+Previously it was possible to select between "http://", "https://", "ftp://" and "mailto:" or no
+prefix. As this sets confusion for editors and also makes it more complicated when pasting an
+external URL directly, the field is removed.
+
+The according PHP functionality has been removed:
+
+* The TCA definition for "pages.urltype" and "pages_language_overlay.urltype" has been removed.
+* The according database fields is not populated anymore, and will be removed when using the Database
+Scheme Migrations in the install tool. For new installations the fields are not created anymore.
+* The public PHP class property php:``PageRepository->urltypes`` has been removed.
+
+
+Impact
+======
+
+Editing a page record or page translation record of type "External URL" in the TYPO3 Backend will
+not include the "Protocol" field is anymore. Instead, the "URL" field will contain the full target
+including the scheme part of a URL.
+
+Accessing the public property will throw a PHP-internal warning message.
+
+
+Affected Installations
+======================
+
+TYPO3 extensions making use of the "urltype" fields or TCA values for custom targets or evaluating
+the urltype field in a separate functionality like "custom external redirects".
+
+Migration
+=========
+
+The existing data is migrated via an Install Tool wizard to have all external URLs behave the same
+as before.
+
+The "pages.url" field will now contain the full URL target with scheme.
+
+.. index:: Backend, Database, Frontend, PHP-API, TCA, PartiallyScanned
index 50c3e43..e6e2ee3 100644 (file)
@@ -213,15 +213,10 @@ As an example the template could be use this field to allow a logo to be attache
                                <source>Enter the URL this page redirects to.</source>
                        </trans-unit>
                        <trans-unit id="url.details" xml:space="preserve">
-                               <source>For example, 'http://www.typo3.org' or just 'www.typo3.org' if the 'Protocol' selector is set to 'http://'.
-Use the 'Protocol' selector to select a prefix for the URL.
+                               <source>For example, 'http://www.typo3.org'.
 
 This option is used only if the page 'Type' is set to 'Link to External URL.'</source>
                        </trans-unit>
-                       <trans-unit id="_url.seeAlso">
-                               <source>pages:urltype</source>
-                               <note from="developer">This string contains an internal text, which must not be changed. Just copy the original text into the translation field. For more information have a look at the Tutorial.</note>
-                       </trans-unit>
                        <trans-unit id="shortcut.description">
                                <source>Select a page to act as the Shortcut Target. When the current page is requested in the Frontend, it will be redirected to the Shortcut Target.</source>
                        </trans-unit>
@@ -331,9 +326,6 @@ If you insert a 'd' the current time and date is inserted. You can also append a
                                <source>If set, this is an alternative page to select Content Elements from.
 Whether this field is used depends on the website's TypoScript template.</source>
                        </trans-unit>
-                       <trans-unit id="urltype.description">
-                               <source>Set the Protocol for the URL.</source>
-                       </trans-unit>
                        <trans-unit id="shortcut_mode.description">
                                <source>Select a Shortcut Mode. By default the shortcut page must have a Shortcut Target to jump to. Other options are to go to the first subpage, to a random subpage, or back up to the parent page.</source>
                        </trans-unit>
index 917599c..e321a76 100644 (file)
@@ -104,7 +104,6 @@ class PagesVisibleFieldsTest extends \TYPO3\TestingFramework\Core\Functional\Fun
         ],
         PageRepository::DOKTYPE_LINK => [
             'additionalFields' => [
-                'urltype',
                 'url',
             ],
             'hiddenFields' => [
index 1874d91..b41201a 100644 (file)
@@ -125,7 +125,6 @@ CREATE TABLE pages (
        url varchar(255) DEFAULT '' NOT NULL,
        starttime int(11) unsigned DEFAULT '0' NOT NULL,
        endtime int(11) unsigned DEFAULT '0' NOT NULL,
-       urltype tinyint(4) unsigned DEFAULT '0' NOT NULL,
        shortcut int(10) unsigned DEFAULT '0' NOT NULL,
        shortcut_mode int(10) unsigned DEFAULT '0' NOT NULL,
        no_cache int(10) unsigned DEFAULT '0' NOT NULL,
index 9b6a573..000f919 100644 (file)
@@ -1622,12 +1622,12 @@ abstract class AbstractMenuContentObject
         }
         // Override URL if using "External URL"
         if ($this->menuArr[$key]['doktype'] == PageRepository::DOKTYPE_LINK) {
-            if ($this->menuArr[$key]['urltype'] == 3 && GeneralUtility::validEmail($this->menuArr[$key]['url'])) {
-                // Create mailto-link using \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::typolink (concerning spamProtectEmailAddresses):
-                $LD['totalURL'] = $this->parent_cObj->typoLink_URL(['parameter' => $this->menuArr[$key]['url']]);
+            $externalUrl = $this->getSysPage()->getExtURL($this->menuArr[$key]);
+            // Create link using typolink (concerning spamProtectEmailAddresses) for email links
+            $LD['totalURL'] = $this->parent_cObj->typoLink_URL(['parameter' => $externalUrl]);
+            // Links to emails should not have any target
+            if (stripos($externalUrl, 'mailto:') === 0) {
                 $LD['target'] = '';
-            } else {
-                $LD['totalURL'] = $this->parent_cObj->typoLink_URL(['parameter' => $this->getSysPage()->getExtURL($this->menuArr[$key])]);
             }
         }
 
index b23ccb8..8717cd1 100644 (file)
@@ -39,11 +39,6 @@ use TYPO3\CMS\Core\Versioning\VersionState;
 class PageRepository
 {
     /**
-     * @var array
-     */
-    public $urltypes = ['', 'http://', 'ftp://', 'mailto:', 'https://'];
-
-    /**
      * This is not the final clauses. There will normally be conditions for the
      * hidden, starttime and endtime fields as well. You MUST initialize the object
      * by the init() function
@@ -948,21 +943,25 @@ class PageRepository
     }
 
     /**
-     * Returns the URL type for the input page row IF the doktype is set to 3.
+     * Returns the redirect URL for the input page row IF the doktype is set to 3.
      *
      * @param array $pagerow The page row to return URL type for
-     * @return string|bool The URL from based on the data from "urltype" and "url". False if not found.
+     * @return string|bool The URL from based on the data from "pages:url". False if not found.
      * @see \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::initializeRedirectUrlHandlers()
      */
     public function getExtURL($pagerow)
     {
         if ((int)$pagerow['doktype'] === self::DOKTYPE_LINK) {
-            $redirectTo = $this->urltypes[$pagerow['urltype']] . $pagerow['url'];
-            // If relative path, prefix Site URL:
+            $redirectTo = $pagerow['url'];
             $uI = parse_url($redirectTo);
-            // Relative path assumed now.
-            if (!$uI['scheme'] && $redirectTo[0] !== '/') {
-                $redirectTo = GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . $redirectTo;
+            // If relative path, prefix Site URL
+            // If it's a valid email without protocol, add "mailto:"
+            if (!$uI['scheme']) {
+                if (GeneralUtility::validEmail($redirectTo)) {
+                    $redirectTo = 'mailto:' . $redirectTo;
+                } elseif ($redirectTo[0] !== '/') {
+                    $redirectTo = GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . $redirectTo;
+                }
             }
             return $redirectTo;
         }
index 1abbbba..3bb54f6 100644 (file)
@@ -200,16 +200,6 @@ return [
                 'softref' => 'url'
             ]
         ],
-        'urltype' => [
-            'exclude' => true,
-            'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.type',
-            'config' => [
-                'type' => 'select',
-                'renderType' => 'selectSingle',
-                'items' => $GLOBALS['TCA']['pages']['columns']['urltype']['config']['items'],
-                'default' => '1'
-            ]
-        ],
         'shortcut' => [
             'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.shortcut_page',
             'config' => [
@@ -401,7 +391,7 @@ return [
             'showitem' => 'shortcut;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.shortcut_formlabel',
         ],
         'external' => [
-            'showitem' => 'urltype;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.urltype_formlabel, url;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.url_formlabel',
+            'showitem' => 'url;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.url_formlabel',
         ],
         'title' => [
             'showitem' => 'title;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.title_formlabel, --linebreak--, nav_title;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.nav_title_formlabel, --linebreak--, subtitle;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.subtitle_formlabel',
index 2ca37b3..ab789f9 100644 (file)
                        <trans-unit id="pages.url_formlabel">
                                <source>URL</source>
                        </trans-unit>
-                       <trans-unit id="pages.urltype_formlabel">
-                               <source>Protocol</source>
-                       </trans-unit>
                        <trans-unit id="pages.lastUpdated">
                                <source>Last Updated:</source>
                        </trans-unit>
index 9fd56e3..e585786 100644 (file)
@@ -77,7 +77,6 @@ class PagesLanguageOverlayVisibleFieldsTest extends \TYPO3\TestingFramework\Core
         ],
         PageRepository::DOKTYPE_LINK => [
             'additionalFields' => [
-                'urltype',
                 'url',
             ],
             'hiddenFields' => [
index 4dabb4b..ec63f48 100644 (file)
@@ -58,24 +58,55 @@ class PageRepositoryTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     /**
      * @test
      */
-    public function getExtUrlForDokType3AndUrlType1AddsHttpSchemeToUrl()
+    public function getExtUrlForDokType3UsesTheSameValue()
     {
         $this->assertEquals('http://www.example.com', $this->pageSelectObject->getExtURL([
             'doktype' => \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_LINK,
-            'urltype' => 1,
-            'url' => 'www.example.com'
+            'url' => 'http://www.example.com'
         ]));
     }
 
     /**
      * @test
      */
-    public function getExtUrlForDokType3AndUrlType0PrependsSiteUrl()
+    public function getExtUrlForDokType3PrependsSiteUrl()
     {
         $this->assertEquals(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . 'hello/world/', $this->pageSelectObject->getExtURL([
             'doktype' => \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_LINK,
-            'urltype' => 0,
             'url' => 'hello/world/'
         ]));
     }
+
+    /**
+     * @test
+     */
+    public function getExtUrlForDokType3AssumesAbsoluteUrl()
+    {
+        $this->assertEquals('/hello/world/', $this->pageSelectObject->getExtURL([
+            'doktype' => \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_LINK,
+            'url' => '/hello/world/'
+        ]));
+    }
+
+    /**
+     * @test
+     */
+    public function getExtUrlForDokType3UsesEmailAsSameValue()
+    {
+        $this->assertEquals('mailto:mail@typo3-test.com', $this->pageSelectObject->getExtURL([
+            'doktype' => \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_LINK,
+            'url' => 'mailto:mail@typo3-test.com'
+        ]));
+    }
+
+    /**
+     * @test
+     */
+    public function getExtUrlForDokType3UsesValidEmailWithoutProtocolAsEmail()
+    {
+        $this->assertEquals('mailto:mail@typo3-test.com', $this->pageSelectObject->getExtURL([
+            'doktype' => \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_LINK,
+            'url' => 'mail@typo3-test.com'
+        ]));
+    }
 }
index 1178bae..f2c72f7 100644 (file)
@@ -141,7 +141,6 @@ CREATE TABLE pages_language_overlay (
        author_email varchar(80) DEFAULT '' NOT NULL,
        l18n_diffsource mediumblob,
        url varchar(255) DEFAULT '' NOT NULL,
-       urltype tinyint(4) unsigned DEFAULT '0' NOT NULL,
        shortcut int(10) unsigned DEFAULT '0' NOT NULL,
        shortcut_mode int(10) unsigned DEFAULT '0' NOT NULL,
 
diff --git a/typo3/sysext/install/Classes/Updates/MigrateUrlTypesInPagesUpdate.php b/typo3/sysext/install/Classes/Updates/MigrateUrlTypesInPagesUpdate.php
new file mode 100644 (file)
index 0000000..e1096a6
--- /dev/null
@@ -0,0 +1,154 @@
+<?php
+declare(strict_types=1);
+
+namespace TYPO3\CMS\Install\Updates;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3\CMS\Core\Database\ConnectionPool;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
+/**
+ * Merge URLs divided in pages.urltype and pages.url into pages.url
+ */
+class MigrateUrlTypesInPagesUpdate extends AbstractUpdate
+{
+    /**
+     * @var string
+     */
+    protected $title = 'Migrate pages.urltype to pages.url';
+
+    private $databaseTables = ['pages', 'pages_language_overlay'];
+    private $urltypes = ['', 'http://', 'ftp://', 'mailto:', 'https://'];
+
+    /**
+     * Checks if an update is needed
+     *
+     * @param string $description The description for the update
+     * @return bool Whether an update is needed (true) or not (false)
+     * @throws \InvalidArgumentException
+     */
+    public function checkForUpdate(&$description): bool
+    {
+        if ($this->isWizardDone()) {
+            return false;
+        }
+
+        if ($this->checkIfWizardIsNotRequired()) {
+            $this->markWizardAsDone();
+            return false;
+        }
+
+        $description = '<p>The page property "URL Protocol" for external URLs has been merged into the URL itself.</p>
+The update wizard takes care of properly populating all existing pages and page translations.';
+
+        $recordsToMigrate = 0;
+
+        // Check if there is data to migrate
+        foreach ($this->databaseTables as $databaseTable) {
+            $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
+                ->getQueryBuilderForTable($databaseTable);
+            $queryBuilder->getRestrictions()->removeAll();
+            $recordsToMigrate = $queryBuilder->count('*')
+                ->from($databaseTable)
+                ->where(
+                    $queryBuilder->expr()->neq('urltype', 0),
+                    $queryBuilder->expr()->neq('url', $queryBuilder->createPositionalParameter(''))
+                )
+                ->execute()
+                ->fetchColumn();
+
+            if ($recordsToMigrate > 0) {
+                break;
+            }
+        }
+
+        return $recordsToMigrate > 0;
+    }
+
+    /**
+     * Check each table if the column exists
+     *
+     * @return bool
+     * @throws \InvalidArgumentException
+     */
+    protected function checkIfWizardIsNotRequired(): bool
+    {
+        foreach ($this->databaseTables as $key => $databaseTable) {
+            $columns = GeneralUtility::makeInstance(ConnectionPool::class)
+                ->getConnectionForTable($databaseTable)
+                ->getSchemaManager()
+                ->listTableColumns($databaseTable);
+            if (!isset($columns['urltype'])) {
+                unset($this->databaseTables[$key]);
+            }
+        }
+
+        return count($this->databaseTables) === 0;
+    }
+
+    /**
+     * Moves data from pages.urltype to pages.url
+     *
+     * @param array $databaseQueries Queries done in this update
+     * @param string $customMessage Custom messages
+     * @return bool
+     * @throws \InvalidArgumentException
+     * @throws \Doctrine\DBAL\DBALException
+     */
+    public function performUpdate(array &$databaseQueries, &$customMessage): bool
+    {
+        if ($this->checkIfWizardIsNotRequired()) {
+            $this->markWizardAsDone();
+            return false;
+        }
+        foreach ($this->databaseTables as $databaseTable) {
+            $connection = GeneralUtility::makeInstance(ConnectionPool::class)
+                ->getConnectionForTable($databaseTable);
+
+            // Process records that have entries in pages.urltype
+            $queryBuilder = $connection->createQueryBuilder();
+            $queryBuilder->getRestrictions()->removeAll();
+            $statement = $queryBuilder->select('uid', 'urltype', 'url')
+                ->from($databaseTable)
+                ->where(
+                    $queryBuilder->expr()->neq('urltype', 0),
+                    $queryBuilder->expr()->neq('url', $queryBuilder->createPositionalParameter(''))
+                )
+                ->execute();
+
+            $databaseQueries[] = $queryBuilder->getSQL();
+
+            while ($row = $statement->fetch()) {
+                $url = $this->urltypes[(int)$row['urltype']] . $row['url'];
+                $updateQueryBuilder = $connection->createQueryBuilder();
+                $updateQueryBuilder
+                    ->update($databaseTable)
+                    ->where(
+                        $updateQueryBuilder->expr()->eq(
+                            'uid',
+                            $updateQueryBuilder->createNamedParameter($row['uid'], \PDO::PARAM_INT)
+                        )
+                    )
+                    ->set('url', $updateQueryBuilder->createNamedParameter($url), false)
+                    ->set('urltype', 0);
+
+                $databaseQueries[] = $updateQueryBuilder->getSQL();
+                $updateQueryBuilder->execute();
+            }
+        }
+        $this->markWizardAsDone();
+        return true;
+    }
+}
index ee0b654..035fbea 100644 (file)
@@ -139,6 +139,11 @@ return [
             'Breaking-81171-EditAbilityOfTypoScriptTemplateInEXTtstemplateRemoved.rst',
         ],
     ],
+    'TYPO3\CMS\Frontend\Page\PageRepository->urltypes' => [
+        'restFiles' => [
+            'Breaking-71306-DroppedProtocolFieldFromPageTypeLinkToExternalURL.rst',
+        ],
+    ],
 
     // Deprecated public properties
 ];
index 92deb36..b048f5e 100644 (file)
@@ -57,6 +57,8 @@ $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['typo3DbLegac
     = \TYPO3\CMS\Install\Updates\Typo3DbExtractionUpdate::class;
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['funcExtension']
     = \TYPO3\CMS\Install\Updates\FuncExtractionUpdate::class;
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['pagesUrltypeField']
+    = \TYPO3\CMS\Install\Updates\MigrateUrlTypesInPagesUpdate::class;
 
 $iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
 $icons = [