TYPO3 v15 dev-main snapshot ()

This commit is contained in:
2026-08-10 22:31:33 +02:00
commit 1a6eae9988
124 changed files with 11393 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
<?php
use TYPO3\CMS\Redirects\Controller;
/**
* Definitions for routes provided by EXT:backend
* Contains all AJAX-based routes for entry points
*
* Currently the "access" property is only used so no token creation + validation is made
* but will be extended further.
*/
return [
// Revert Correlation
'redirects_revert_correlation' => [
'path' => '/redirects/revert/correlation',
'methods' => ['POST'],
'target' => Controller\RecordHistoryRollbackController::class . '::revertCorrelation',
],
// Endpoint to generate a Short URL
'short_url_generate' => [
'path' => '/short-url/generate',
'methods' => ['POST'],
'target' => Controller\ShortUrlGeneratorController::class . '::generate',
],
// Endpoint to validate a Short URL for uniqueness
'short_url_validate' => [
'path' => '/short-url/validate',
'methods' => ['POST'],
'target' => Controller\ShortUrlGeneratorController::class . '::validate',
],
];
+57
View File
@@ -0,0 +1,57 @@
<?php
use TYPO3\CMS\Redirects\Controller\ManagementController;
use TYPO3\CMS\Redirects\Controller\QrCodeModuleController;
use TYPO3\CMS\Redirects\Controller\ShortUrlModuleController;
/**
* Definitions for modules provided by EXT:redirects
*/
return [
'redirects' => [
'parent' => 'link_management',
'access' => 'user',
'path' => '/module/link-management/redirects',
'iconIdentifier' => 'module-redirects',
'labels' => 'redirects.modules.redirects',
'aliases' => ['site_redirects'],
'routes' => [
'_default' => [
'target' => ManagementController::class . '::handleRequest',
],
],
'moduleData' => [
'redirectType' => 'default',
],
],
'qrcodes' => [
'parent' => 'link_management',
'access' => 'user',
'path' => '/module/link-management/qrcodes',
'iconIdentifier' => 'module-qrcode',
'labels' => 'redirects.modules.qrcodes',
'routes' => [
'_default' => [
'target' => QrCodeModuleController::class . '::handleRequest',
],
],
'moduleData' => [
'redirectType' => 'qrcode',
],
],
'short_urls' => [
'parent' => 'link_management',
'access' => 'user',
'path' => '/module/link-management/short-urls',
'iconIdentifier' => 'module-urls',
'labels' => 'redirects.modules.short_urls',
'routes' => [
'_default' => [
'target' => ShortUrlModuleController::class . '::handleRequest',
],
],
'moduleData' => [
'redirectType' => 'short_url',
],
],
];
+8
View File
@@ -0,0 +1,8 @@
<?php
return [
'mimetypes-x-sys_redirect' => [
'provider' => \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
'source' => 'EXT:redirects/Resources/Public/Icons/mimetypes-x-sys_redirect.svg',
],
];
+11
View File
@@ -0,0 +1,11 @@
<?php
return [
'dependencies' => [
'backend',
'core',
],
'imports' => [
'@typo3/redirects/' => 'EXT:redirects/Resources/Public/JavaScript/',
],
];
+18
View File
@@ -0,0 +1,18 @@
<?php
/**
* Definitions for middlewares provided by EXT:redirects
*/
return [
'frontend' => [
'typo3/cms-redirects/redirecthandler' => [
'target' => \TYPO3\CMS\Redirects\Http\Middleware\RedirectHandler::class,
'before' => [
'typo3/cms-frontend/base-redirect-resolver',
],
'after' => [
'typo3/cms-frontend/authentication',
],
],
],
];
+20
View File
@@ -0,0 +1,20 @@
services:
_defaults:
autowire: true
autoconfigure: true
public: false
TYPO3\CMS\Redirects\:
resource: '../Classes/*'
extension.configuration.redirects:
class: 'array'
factory:
- '@TYPO3\CMS\Core\Configuration\ExtensionConfiguration'
- 'get'
arguments:
- 'redirects'
TYPO3\CMS\Redirects\Configuration\CheckIntegrityConfiguration:
arguments:
$extensionConfiguration: '@extension.configuration.redirects'
+1
View File
@@ -0,0 +1 @@
name: typo3/redirects
+35
View File
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file source-language="en" datatype="plaintext" original="EXT:redirects/Configuration/Sets/redirects/labels.xlf" date="2024-09-10T12:30:00Z" product-name="redirects">
<header/>
<body>
<trans-unit id="label">
<source>Redirects</source>
</trans-unit>
<trans-unit id="categories.redirects">
<source>Redirects</source>
</trans-unit>
<trans-unit id="settings.redirects.autoUpdateSlugs">
<source>Automatically update slugs of all sub pages</source>
</trans-unit>
<trans-unit id="settings.redirects.autoCreateRedirects">
<source>Automatically create redirects for pages with a new slug (works only in LIVE workspace)</source>
</trans-unit>
<trans-unit id="settings.description.redirects.autoCreateRedirects">
<source>This feature works only in LIVE workspace.</source>
</trans-unit>
<trans-unit id="settings.redirects.redirectTTL">
<source>Time To Live in days for redirect records to be created</source>
</trans-unit>
<trans-unit id="settings.description.redirects.redirectTTL">
<source>The value `0` disables expiration.</source>
</trans-unit>
<trans-unit id="settings.redirects.httpStatusCode">
<source>HTTP status code for automatically created redirects</source>
</trans-unit>
<trans-unit id="settings.description.redirects.httpStatusCode">
<source>See https://developer.mozilla.org/en-US/docs/Web/HTTP/Redirections#Temporary_redirections for more information.</source>
</trans-unit>
</body>
</file>
</xliff>
@@ -0,0 +1,20 @@
categories:
redirects: ~
settings:
redirects.autoUpdateSlugs:
type: bool
default: true
category: redirects
redirects.autoCreateRedirects:
type: bool
default: true
category: redirects
redirects.redirectTTL:
type: int
default: 0
category: redirects
redirects.httpStatusCode:
type: int
default: 307
category: redirects
@@ -0,0 +1,5 @@
<?php
defined('TYPO3') or die();
$GLOBALS['TCA']['sys_redirect']['types']['short_url']['columnsOverrides']['source_path']['config']['placeholder'] = 'redirects.module_redirect:short_url.source_path.placeholder';
+334
View File
@@ -0,0 +1,334 @@
<?php
use TYPO3\CMS\Redirects\Utility\RedirectConflict;
return [
'ctrl' => [
'title' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect',
'descriptionColumn' => 'description',
'label' => 'source_host',
'label_alt' => 'source_path',
'label_alt_force' => true,
'crdate' => 'createdon',
'tstamp' => 'updatedon',
'hideTable' => true,
'versioningWS' => false,
'groupName' => 'system',
'default_sortby' => 'source_host, source_path',
'rootLevel' => -1,
'security' => [
'ignoreWebMountRestriction' => true,
'ignoreRootLevelRestriction' => true,
'ignorePageTypeRestriction' => true,
],
'delete' => 'deleted',
'enablecolumns' => [
'disabled' => 'disabled',
'starttime' => 'starttime',
'endtime' => 'endtime',
],
'typeicon_column' => 'redirect_type',
'typeicon_classes' => [
'default' => 'mimetypes-x-sys_redirect',
'qrcode' => 'actions-qrcode',
'short_url' => 'module-urls',
],
'type' => 'redirect_type',
],
'types' => [
'default' => [
'showitem' => '
--div--;core.form.tabs:general, --palette--;;source, --palette--;;targetdetails, protected, --palette--;;internals,
--div--;redirects.db:tabs.redirectCount, disable_hitcount, hitcount, lasthiton, createdon,
--div--;core.form.tabs:access, --palette--;;visibility,
--div--;core.form.tabs:notes, description, redirect_type',
'columnsOverrides' => [
'source_host' => [
'config' => [
'default' => '*',
],
],
],
],
'qrcode' => [
'title' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.redirect_type.qr_code',
'showitem' => '
--div--;core.form.tabs:general, --palette--;;qrcode_target,qrcode_display,
--div--;redirects.db:tabs.redirectCount, disable_hitcount, hitcount, lasthiton, createdon,
--div--;core.form.tabs:access, --palette--;;visibility,
--div--;core.form.tabs:notes, description, redirect_type
',
],
'short_url' => [
'title' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.redirect_type.short_url',
'showitem' => '
--div--;core.form.tabs:general, --palette--;;short_url_target,
--div--;redirects.db:tabs.redirectCount, disable_hitcount, hitcount, lasthiton, createdon,
--div--;core.form.tabs:access, --palette--;;visibility,
--div--;core.form.tabs:notes, description, redirect_type
',
],
],
'palettes' => [
'visibility' => [
'showitem' => 'disabled, --linebreak--, starttime, endtime',
],
'source' => [
'showitem' => 'source_host, source_path, --linebreak--, respect_query_parameters, is_regexp',
],
'targetdetails' => [
'showitem' => 'target, target_statuscode, --linebreak--, force_https, keep_query_parameters',
],
'internals' => [
'showitem' => 'creation_type, integrity_status, --linebreak--, createdby',
],
'qrcode_target' => [
'showitem' => 'source_host, target, --linebreak--, createdby, force_https',
],
'short_url_target' => [
'showitem' => 'short_url, --linebreak--, target, --linebreak--, createdby, force_https',
],
],
'columns' => [
'redirect_type' => [
'config' => [
'type' => 'passthrough',
'default' => 'default',
],
],
'qrcode_display' => [
'config' => [
'type' => 'none',
'renderType' => 'qrCode',
],
],
'short_url' => [
'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.short_url',
'description' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.short_url.description',
'config' => [
'type' => 'none',
'renderType' => 'shortUrl',
'fieldControl' => [
'shortUrlGenerator' => [
'renderType' => 'shortUrlGenerator',
'options' => [
'title' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.short_url.shortUrlGenerator',
],
],
],
],
],
'source_host' => [
'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.source_host',
'config' => [
'type' => 'input',
'required' => true,
'eval' => 'trim,' . \TYPO3\CMS\Redirects\Evaluation\SourceHost::class,
// items will be extended by local sys_domain records using dataprovider TYPO3\CMS\Redirects\FormDataProvider\ValuePickerItemDataProvider
'valuePicker' => [],
],
],
'source_path' => [
'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.source_path',
'config' => [
'type' => 'input',
'size' => 30,
'required' => true,
'eval' => 'trim',
'placeholder' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:source_path.placeholder',
'max' => 2048,
],
],
'force_https' => [
'exclude' => true,
'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.force_https.0',
'config' => [
'type' => 'check',
'renderType' => 'checkboxToggle',
'default' => 0,
],
],
'keep_query_parameters' => [
'exclude' => true,
'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.keep_query_parameters.0',
'config' => [
'type' => 'check',
'renderType' => 'checkboxToggle',
'default' => 0,
],
],
'respect_query_parameters' => [
'exclude' => true,
'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.respect_query_parameters.0',
'config' => [
'type' => 'check',
'renderType' => 'checkboxToggle',
'default' => 0,
],
],
'target' => [
'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.target',
'config' => [
'type' => 'link',
'required' => true,
'allowedTypes' => ['page', 'file', 'url', 'record'],
'appearance' => [
'allowedOptions' => ['params'],
],
],
],
'target_statuscode' => [
'exclude' => true,
'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.target_statuscode',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'items' => [
[
'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.target_statuscode.301',
'value' => 301,
'group' => 'change',
],
[
'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.target_statuscode.302',
'value' => 302,
'group' => 'change',
],
[
'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.target_statuscode.303',
'value' => 303,
'group' => 'change',
],
[
'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.target_statuscode.307',
'value' => 307,
'group' => 'keep',
],
[
'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.target_statuscode.308',
'value' => 308,
'group' => 'keep',
],
],
'itemGroups' => [
'keep' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.target_statuscode.keep',
'change' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.target_statuscode.change',
],
'default' => 307,
],
],
'hitcount' => [
'exclude' => true,
'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.hitcount',
'config' => [
'type' => 'input',
'size' => 5,
'default' => 0,
'readOnly' => true,
],
'displayCond' => 'USER:TYPO3\CMS\Redirects\UserFunctions\HitCountDisplayCondition->isEnabled',
],
'lasthiton' => [
'exclude' => true,
'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.lasthiton',
'config' => [
'type' => 'datetime',
'readOnly' => true,
],
'displayCond' => 'USER:TYPO3\CMS\Redirects\UserFunctions\HitCountDisplayCondition->isEnabled',
],
'createdon' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.creationDate',
'config' => [
'type' => 'datetime',
'readOnly' => true,
],
'displayCond' => 'USER:TYPO3\CMS\Redirects\UserFunctions\HitCountDisplayCondition->isEnabled',
],
'disable_hitcount' => [
'exclude' => true,
'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.hitcountState',
'config' => [
'type' => 'check',
'renderType' => 'checkboxLabeledToggle',
'items' => [
[
'label' => '',
'labelChecked' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.enabled',
'labelUnchecked' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.disabled',
'invertStateDisplay' => true,
],
],
],
'displayCond' => 'USER:TYPO3\CMS\Redirects\UserFunctions\HitCountDisplayCondition->isEnabled',
],
'is_regexp' => [
'exclude' => true,
'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.is_regexp',
'config' => [
'type' => 'check',
'renderType' => 'checkboxToggle',
],
],
'protected' => [
'exclude' => true,
'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.protected',
'description' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.protected.description',
'config' => [
'type' => 'check',
'renderType' => 'checkboxToggle',
],
],
'creation_type' => [
'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.creation_type',
'description' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.creation_type.description',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'items' => [
[
'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.creation_type.0',
'value' => 0,
],
[
'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.creation_type.1',
'value' => 1,
],
],
'default' => 1,
'readOnly' => true,
],
],
'createdby' => [
'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.createdby',
'description' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.createdby.description',
'config' => [
'type' => 'passthrough',
'renderType' => 'creationInformation',
'default' => 0,
],
],
'integrity_status' => [
'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.integrity_status',
'description' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.integrity_status.description',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'dbFieldLength' => 180,
'default' => RedirectConflict::NO_CONFLICT,
'items' => [
[
'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.integrity_status.no_conflict',
'value' => RedirectConflict::NO_CONFLICT,
],
[
'label' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_db.xlf:sys_redirect.integrity_status.self_reference',
'value' => RedirectConflict::SELF_REFERENCE,
],
],
'readOnly' => true,
],
],
],
];