Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Add Page TSconfig provider for sites and sets
TYPO3 sites have been enhanced to be able to provide Page TSconfig on a per site basis. Releases: main Resolves: #103522 Change-Id: I1558ca9265fcd0fd9bef83cb47ec9c54a7a0d59c Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83586 Tested-by: Benni Mack <benni@typo3.org> Tested-by: Benjamin Franzke <ben@bnf.dev> Tested-by: Benjamin Kott <benjamin.kott@outlook.com> Reviewed-by: Benjamin Kott <benjamin.kott@outlook.com> Tested-by: core-ci <typo3@b13.com> Reviewed-by: Benni Mack <benni@typo3.org> Reviewed-by: Benjamin Franzke <ben@bnf.dev>
- Loading branch information
Showing
7 changed files
with
197 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* 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! | ||
*/ | ||
|
||
namespace TYPO3\CMS\Core\Site\Entity; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
final readonly class SiteTSconfig | ||
{ | ||
public function __construct( | ||
public ?string $pageTSconfig = null, | ||
) {} | ||
|
||
public static function __set_state(array $state): self | ||
{ | ||
return new self(...$state); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...mentation/Changelog/13.1/Feature-103522-PageTSconfigProviderForSitesAndSets.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
.. include:: /Includes.rst.txt | ||
|
||
.. _feature-103522-1712323334: | ||
|
||
============================================================ | ||
Feature: #103522 - Page TSconfig provider for Sites and Sets | ||
============================================================ | ||
|
||
See :issue:`103522` | ||
|
||
Description | ||
=========== | ||
|
||
TYPO3 sites have been enhanced to be able to provide Page TSconfig on a per site | ||
basis. | ||
|
||
Site Page TSconfig is loaded from :file:`page.tsconfig` if placed next to | ||
site configuration file :file:`config.yaml` and is scoped to pages within that | ||
site. | ||
|
||
|
||
Impact | ||
====== | ||
|
||
Sites and sets can ship Page TSconfig without the need for database entries or | ||
by polluting global scope when registering Page TSconfig globally via | ||
:file:`ext_localconf.php` or :file:`Configuration/page.tsconfig`. | ||
Dependencies can expressed via sets, allowing for automatic ordering and | ||
deduplication. | ||
|
||
|
||
.. index:: Backend, Frontend, PHP-API, TypoScript, YAML, ext:core |