Skip to content

Commit 20001e2

Browse files
authored
Ready for release 1.10
2 parents cf49a8c + f2a19d3 commit 20001e2

File tree

18 files changed

+83
-104
lines changed

18 files changed

+83
-104
lines changed

ChangeLog.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
1.10.0
2+
=====
3+
* Version compatibility set to 9.5.0-10.4.99
4+
* Remove namespace compatibility layer
5+
* Refactoring for TYPO3 10.4
6+
* Update manual
7+
18
1.9.0
29
=====
310
* Version compatibility set to 8.7.0-9.5.99

Classes/ContentObject/XsltContentObject.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,14 @@
3333
use TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser;
3434
use TYPO3\CMS\Core\TimeTracker\TimeTracker;
3535
use TYPO3\CMS\Core\Utility\VersionNumberUtility;
36+
use TYPO3\CMS\Frontend\ContentObject\AbstractContentObject;
37+
3638

3739
if (!defined('TYPO3_MODE')) {
3840
die('Access denied.');
3941
}
4042

41-
class XsltContentObject
43+
class XsltContentObject extends AbstractContentObject
4244
{
4345

4446
/**
@@ -59,18 +61,14 @@ class XsltContentObject
5961
/**
6062
* Renders the XSLT content object
6163
*
62-
* @param string $name XSLT
63-
* @param array $conf TypoScript configuration of the cObj
64-
* @param string $TSKey Key in the TypoScript array passed to this function
65-
* @param object $oCObj Reference to the parent class
64+
* @param array $conf TypoScript configuration of the cObj
6665
*
6766
* @return string The transformed XML string
6867
*
6968
*/
70-
public function cObjGetSingleExt($name, array $conf, $TSkey, ContentObjectRenderer &$oCObj)
69+
public function render($conf = [])
7170
{
7271
$content = '';
73-
$this->cObj = $oCObj;
7472

7573
// TimeTracker object is gone in TYPO3 8 but needed to set TS log messages; instantiate in versions >= 8.7
7674
if (VersionNumberUtility::convertVersionNumberToInteger(TYPO3_branch) >= 8007000 && !is_object($GLOBALS['TT'])) {

Classes/ViewHelpers/TransformViewHelper.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* This copyright notice MUST APPEAR in all copies of the script!
2727
***************************************************************/
2828

29-
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
29+
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
3030
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
3131

3232
/**
@@ -109,7 +109,6 @@ public function render()
109109
}
110110
$configuration['source'] = trim($source);
111111
$content = $this->contentObject->cObjGetSingle('XSLT', $configuration, '');
112-
113112
}
114113

115114
return $content;

Documentation/Changelog/Index.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ ChangeLog
1212
+----------------+---------------------------------------------------------------+
1313
| Version | Changes |
1414
+================+===============================================================+
15+
| 1.10.0 | - TYPO3 compatibility: 9.5.0-10.4.99 |
16+
| | |
17+
| | - Remove namespace compatibility layer |
18+
| | |
19+
| | - Refactoring for TYPO3 v10 (thanks to contributors!) |
20+
| | |
21+
| | - Update manual |
22+
+----------------+---------------------------------------------------------------+
1523
| 1.9.0 | - TYPO3 compatibility: 8.7.0-9.5.99 |
1624
| | |
1725
| | - **Important:** Extension namespace switched from |

Documentation/Index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ XSLT Content Object
2727
XML, XSLT
2828

2929
:Copyright:
30-
2012-2019
30+
2012-2020
3131

3232
:Author:
3333
Torsten Schrade

Documentation/Installation/Index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ Requirements
1414

1515
- You need the PHP extensions libxml, SimpleXML, dom and xsl
1616

17-
- Supported TYPO3 versions: 8.79.5
17+
- Supported TYPO3 versions: 9.510.4
1818

1919
Installation
2020
^^^^^^^^^^^^
2121

22-
Simply import it from TER and install. Nothing else needs to be done.
22+
Simply import it with composer or from TER and install. Nothing else needs to be done.

Documentation/Reference/Index.rst

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ Reference
1111

1212
This section gives an overview on all TypoScript properties of the XSLT content object.
1313

14+
.. attention::
15+
16+
In TYPO3 10.4 the FILE TypoScript object was removed. You can use a FLUIDTEMPLATE
17+
cObject instead. In respect to TYPO3 9.5 the deprecated FILE cObject is still supported.
18+
1419
.. container:: table-row
1520

1621
Property
@@ -21,7 +26,7 @@ This section gives an overview on all TypoScript properties of the XSLT content
2126

2227
Description
2328
This fetches the XML data from a source. Can be an XML string, a field
24-
in the database containing XML, a file (path or via TypoScript FILE
29+
in the database containing XML, a file (path or FLUIDTEMPLATE
2530
cObject) or an external resource.
2631

2732
**Example (field):** ::
@@ -35,18 +40,17 @@ This section gives an overview on all TypoScript properties of the XSLT content
3540
Fetches the XML from the field 'my\_xml\_field' of the current page
3641
record.
3742

38-
**Example (stdWrap / FILE):** ::
43+
**Example (stdWrap / FLUIDTEMPLATE):** ::
3944

4045
page.10 = XSLT
4146
page.10 {
42-
source.cObject = FILE
47+
source.cObject = FLUIDTEMPLATE
4348
source.cObject.file = fileadmin/myfile.xml
4449
[...]
4550
}
4651

47-
This fetches the XML from a file included with TypoScript's FILE
48-
content object. Please note: Due to FILE's internal settings, the data
49-
can't be larger than 1024kb. See TSref.
52+
This fetches the XML from a file included with TypoScript's FLUIDTEMPLATE
53+
content object.
5054

5155
**Example (external):** ::
5256

@@ -126,7 +130,7 @@ This section gives an overview on all TypoScript properties of the XSLT content
126130
**Example (stdWrap):** ::
127131

128132
transformations.1 {
129-
stylesheet.cObject = FILE
133+
stylesheet.cObject = FLUIDTEMPLATE
130134
stylesheet.cObject.file = fileadmin/my.xsl
131135
[...]
132136
}
@@ -409,4 +413,3 @@ Next is an example for all TS configuration options with their according data ty
409413

410414
stdWrap [stdWrap to the whole object]
411415
}
412-

Documentation/Settings.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
---
66
conf.py:
7-
copyright: 2019
7+
copyright: 2012-2020
88
project: XSLT Content Object
99
version: 0.1
10-
release: 1.9.0
10+
release: 1.10.0
1111
latex_documents:
1212
- Index
1313
- cobj_xslt.tex

Documentation/Tutorials/ABasicTransformation/Index.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ configured below the **transformation.** property. We proceed:
6464
page.10 = XSLT
6565
page.10 {
6666
source = fileadmin/collection.xml
67-
transformations {
68-
1 {
69-
stylesheet = fileadmin/collection.xsl
70-
}
67+
transformations {
68+
1 {
69+
stylesheet = fileadmin/collection.xsl
7170
}
72-
stdWrap.wrap = <div id=”cd-collection”> | </div>
71+
}
72+
stdWrap.wrap = <div id=”cd-collection”> | </div>
7373
}
7474

7575
The stylesheet subproperty fetches the XSL styles from the specified
@@ -115,15 +115,15 @@ with stdWrap:
115115
page.10 = XSLT
116116
page.10 {
117117
source = fileadmin/collection.xml
118-
transformations {
119-
1 {
120-
stylesheet = fileadmin/collection.xsl
121-
setParameters {
122-
pagetitle.value.data = page : title
123-
}
124-
}
125-
}
126-
stdWrap.wrap = <div id=”cd-collection”> | </div>
118+
transformations {
119+
1 {
120+
stylesheet = fileadmin/collection.xsl
121+
setParameters {
122+
pagetitle.value.data = page : title
123+
}
124+
}
125+
}
126+
stdWrap.wrap = <div id=”cd-collection”> | </div>
127127
}
128128

129129
Output:

Documentation/Tutorials/XsltAndFluidtemplate/Index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ transformations we would like the data to go through. Just as in
6969
TypoScript, the second level of this array is associative. The keys
7070
reflect the according TypoScript properties.
7171

72-
.. attention::
72+
.. attention::
7373

74-
From TYPO3 version 8.7 onwards you must wrap the view helper output in <f:format.raw> tags.
74+
Starting with TYPO3 version 8.7 you must wrap the view helper output in <f:format.raw> tags.
7575

76-
You can only use the above five properties in the XSLT view helper.
76+
You can use the following five properties in the XSLT view helper:
7777

7878
+----------------------+---------------------------------------------------------------+
7979
| property | description |

Documentation/Tutorials/XsltTypotag/Index.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
.. important::
1313

1414
TYPO3 versions lower than 7.6.20 and 8.7.3 contain a bug that prevents the functionality
15-
described in this tutorial from working. Please make sure you use the above versions (or higher)
15+
described in this tutorial from working. Please make sure that you use the correct versions
1616
if you want to implement the TypoTag functionality.
1717

1818
From a developers point of view using the XSLT content object in a
@@ -25,13 +25,13 @@ in the system. You can also use it in a news record or an address element for ex
2525

2626
.. attention::
2727

28-
TYPO3 7.6 and 8.7 use different rich text editors (rtehtmlarea and ckeditor).
28+
TYPO3 7.6 and 8.7-10.4 use different rich text editors (rtehtmlarea and ckeditor).
2929
The configuration therefore depends on your TYPO3 version and the RTE you use. The
3030
tutorial will first discuss the general setup of the TypoTag and then show the
3131
respective configurations for the two RTEs.
3232

33-
Configuration for a simple input field (TYPO3 7.6 and 8.7)
34-
----------------------------------------------------------
33+
Configuration for a simple input field (TYPO3 7.6 and 8.7-10.4)
34+
---------------------------------------------------------------
3535

3636
The configuration for a simple input field without RTE works the same for both TYPO3 versions
3737
and is also the basis for the integration of the TypoTag into the respective RTE.
@@ -146,8 +146,8 @@ This is the PageTSconfig for achieving the user element:
146146
Notice: Its not possible to set attributes with a user element. Therefore you will
147147
have to set a fixed XSL stylesheet for each <xslt> user element you define.
148148

149-
Configuration for ckeditor (TYPO3 8.7)
150-
--------------------------------------
149+
Configuration for ckeditor (TYPO3 8.7-10.4)
150+
-------------------------------------------
151151

152152
From this version onwards CKEditor is the new default RTE. Note that you can still use rtehtmlarea in TYPO3 8.7
153153
but it is now a separate extension in TER. The integration of the <xslt> TypoTag into CKEditor is fully backwards

Migrations/Code/ClassAliasMap.php

Lines changed: 0 additions & 5 deletions
This file was deleted.

Migrations/Code/LegacyClassesForIde.php

Lines changed: 0 additions & 22 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ The documentation is at [https://docs.typo3.org/p/digicademy/cobj_xslt/master/en
1414

1515
| Version | TYPO3 | PHP | Support |
1616
| ----------- | ---------- | ----------|---------------------------------------- |
17-
| 1.9 | 8.7 - 9.5 | 7.2 | Features, Bugfixes, Security Updates |
17+
| 1.10 | 9.5 - 10.4 | 7.2 | Features, Bugfixes, Security Updates |
18+
| 1.9 | 8.7 - 9.5 | 7.2 | Bugfixes, Security Updates |
1819
| 1.8 | 7.6 - 8.7 | 5.6 - 7.2 | none |
1920
| 1.7 | 6.2 - 7.6 | 5.6 - 7.2 | none |
2021
| 1.6 | 4.5 - 6.2 | 5.4 - 5.6 | none |
@@ -24,4 +25,4 @@ The documentation is at [https://docs.typo3.org/p/digicademy/cobj_xslt/master/en
2425
This software is licensed under the terms of the GNU General Public License v2
2526
as published by the Free Software Foundation.
2627

27-
Copyright <a href="https://orcid.org/0000-0002-0953-2818">Torsten Schrade</a> | <a href="http://www.adwmainz.de">Academy of Sciences and Literature | Mainz</a>
28+
Copyright <a href="https://orcid.org/0000-0002-0953-2818">Torsten Schrade</a> | <a href="http://www.adwmainz.de">Academy of Sciences and Literature | Mainz</a>

composer.json

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,20 @@
33
"type": "typo3-cms-extension",
44
"description": "Extends TYPO3 with a new content object XSLT for flexible XML transformations",
55
"homepage": "http://www.adwmainz.de/",
6-
"authors": [
7-
{
8-
"name": "Torsten Schrade",
9-
"email": "Torsten.Schrade@adwmainz.de",
10-
"role": "Developer",
11-
"homepage": "http://www.adwmainz.de"
12-
}
13-
],
6+
"authors": [{
7+
"name": "Torsten Schrade",
8+
"email": "Torsten.Schrade@adwmainz.de",
9+
"role": "Developer",
10+
"homepage": "http://www.adwmainz.de"
11+
}],
1412
"license": ["GPL-2.0+"],
1513
"keywords": ["TYPO3", "XML", "XSLT", "Digital Humanities"],
1614
"support": {
1715
"issues": "https://github.com/digicademy/cobj_xslt/issues"
1816
},
19-
"version": "1.9.0",
17+
"version": "1.10.0",
2018
"require": {
21-
"typo3/cms-core": ">=8.7.0 || <=9.5.99",
19+
"typo3/cms-core": ">=9.5.0 || <=10.4.99",
2220
"ext-libxml": "*",
2321
"ext-json": "*",
2422
"ext-simplexml": "*",
@@ -31,14 +29,7 @@
3129
},
3230
"autoload": {
3331
"psr-4": {
34-
"Digicademy\\CobjXslt\\": "Classes/"
35-
}
36-
},
37-
"extra": {
38-
"typo3/class-alias-loader": {
39-
"class-alias-maps": [
40-
"Migrations/Code/ClassAliasMap.php"
41-
]
32+
"Digicademy\\CobjXslt\\": "Classes/"
4233
}
4334
}
44-
}
35+
}

docker-compose.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
version: '2'
1+
version: '3'
22
services:
33
t3docmake:
44
image: t3docs/render-documentation:latest
5+
command: makehtml
56
volumes:
6-
- ./:/PROJECT:ro
7-
- ./Documentation-GENERATED-temp:/RESULT
8-
command: makehtml
7+
- ./:/PROJECT:ro
8+
- ./Documentation-GENERATED-temp:/RESULT

ext_emconf.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
'clearCacheOnLoad' => 1,
2020
'lockType' => '',
2121
'author_company' => 'Academy of Sciences and Literature | Mainz',
22-
'version' => '1.9.0',
22+
'version' => '1.10.0',
2323
'CGLcompliance' => '',
2424
'CGLcompliance_note' => '',
2525
'constraints' => array(
2626
'depends' => array(
27-
'typo3' => '8.7.0-9.5.99',
27+
'typo3' => '9.5.0-10.4.99',
2828
),
2929
'conflicts' => array(),
3030
'suggests' => array(

0 commit comments

Comments
 (0)