Skip to content

Commit

Permalink
Ready for release 1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
metacontext authored Aug 9, 2020
2 parents cf49a8c + f2a19d3 commit 20001e2
Show file tree
Hide file tree
Showing 18 changed files with 83 additions and 104 deletions.
7 changes: 7 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
1.10.0
=====
* Version compatibility set to 9.5.0-10.4.99
* Remove namespace compatibility layer
* Refactoring for TYPO3 10.4
* Update manual

1.9.0
=====
* Version compatibility set to 8.7.0-9.5.99
Expand Down
12 changes: 5 additions & 7 deletions Classes/ContentObject/XsltContentObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@
use TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser;
use TYPO3\CMS\Core\TimeTracker\TimeTracker;
use TYPO3\CMS\Core\Utility\VersionNumberUtility;
use TYPO3\CMS\Frontend\ContentObject\AbstractContentObject;


if (!defined('TYPO3_MODE')) {
die('Access denied.');
}

class XsltContentObject
class XsltContentObject extends AbstractContentObject
{

/**
Expand All @@ -59,18 +61,14 @@ class XsltContentObject
/**
* Renders the XSLT content object
*
* @param string $name XSLT
* @param array $conf TypoScript configuration of the cObj
* @param string $TSKey Key in the TypoScript array passed to this function
* @param object $oCObj Reference to the parent class
* @param array $conf TypoScript configuration of the cObj
*
* @return string The transformed XML string
*
*/
public function cObjGetSingleExt($name, array $conf, $TSkey, ContentObjectRenderer &$oCObj)
public function render($conf = [])
{
$content = '';
$this->cObj = $oCObj;

// TimeTracker object is gone in TYPO3 8 but needed to set TS log messages; instantiate in versions >= 8.7
if (VersionNumberUtility::convertVersionNumberToInteger(TYPO3_branch) >= 8007000 && !is_object($GLOBALS['TT'])) {
Expand Down
3 changes: 1 addition & 2 deletions Classes/ViewHelpers/TransformViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/

use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;

/**
Expand Down Expand Up @@ -109,7 +109,6 @@ public function render()
}
$configuration['source'] = trim($source);
$content = $this->contentObject->cObjGetSingle('XSLT', $configuration, '');

}

return $content;
Expand Down
8 changes: 8 additions & 0 deletions Documentation/Changelog/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ ChangeLog
+----------------+---------------------------------------------------------------+
| Version | Changes |
+================+===============================================================+
| 1.10.0 | - TYPO3 compatibility: 9.5.0-10.4.99 |
| | |
| | - Remove namespace compatibility layer |
| | |
| | - Refactoring for TYPO3 v10 (thanks to contributors!) |
| | |
| | - Update manual |
+----------------+---------------------------------------------------------------+
| 1.9.0 | - TYPO3 compatibility: 8.7.0-9.5.99 |
| | |
| | - **Important:** Extension namespace switched from |
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ XSLT Content Object
XML, XSLT

:Copyright:
2012-2019
2012-2020

:Author:
Torsten Schrade
Expand Down
4 changes: 2 additions & 2 deletions Documentation/Installation/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ Requirements

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

- Supported TYPO3 versions: 8.79.5
- Supported TYPO3 versions: 9.510.4

Installation
^^^^^^^^^^^^

Simply import it from TER and install. Nothing else needs to be done.
Simply import it with composer or from TER and install. Nothing else needs to be done.
19 changes: 11 additions & 8 deletions Documentation/Reference/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ Reference

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

.. attention::

In TYPO3 10.4 the FILE TypoScript object was removed. You can use a FLUIDTEMPLATE
cObject instead. In respect to TYPO3 9.5 the deprecated FILE cObject is still supported.

.. container:: table-row

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

Description
This fetches the XML data from a source. Can be an XML string, a field
in the database containing XML, a file (path or via TypoScript FILE
in the database containing XML, a file (path or FLUIDTEMPLATE
cObject) or an external resource.

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

**Example (stdWrap / FILE):** ::
**Example (stdWrap / FLUIDTEMPLATE):** ::

page.10 = XSLT
page.10 {
source.cObject = FILE
source.cObject = FLUIDTEMPLATE
source.cObject.file = fileadmin/myfile.xml
[...]
}

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

**Example (external):** ::

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

transformations.1 {
stylesheet.cObject = FILE
stylesheet.cObject = FLUIDTEMPLATE
stylesheet.cObject.file = fileadmin/my.xsl
[...]
}
Expand Down Expand Up @@ -409,4 +413,3 @@ Next is an example for all TS configuration options with their according data ty

stdWrap [stdWrap to the whole object]
}

4 changes: 2 additions & 2 deletions Documentation/Settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

---
conf.py:
copyright: 2019
copyright: 2012-2020
project: XSLT Content Object
version: 0.1
release: 1.9.0
release: 1.10.0
latex_documents:
- Index
- cobj_xslt.tex
Expand Down
28 changes: 14 additions & 14 deletions Documentation/Tutorials/ABasicTransformation/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ configured below the **transformation.** property. We proceed:
page.10 = XSLT
page.10 {
source = fileadmin/collection.xml
transformations {
1 {
stylesheet = fileadmin/collection.xsl
}
transformations {
1 {
stylesheet = fileadmin/collection.xsl
}
stdWrap.wrap = <div id=”cd-collection”> | </div>
}
stdWrap.wrap = <div id=”cd-collection”> | </div>
}

The stylesheet subproperty fetches the XSL styles from the specified
Expand Down Expand Up @@ -115,15 +115,15 @@ with stdWrap:
page.10 = XSLT
page.10 {
source = fileadmin/collection.xml
transformations {
1 {
stylesheet = fileadmin/collection.xsl
setParameters {
pagetitle.value.data = page : title
}
}
}
stdWrap.wrap = <div id=”cd-collection”> | </div>
transformations {
1 {
stylesheet = fileadmin/collection.xsl
setParameters {
pagetitle.value.data = page : title
}
}
}
stdWrap.wrap = <div id=”cd-collection”> | </div>
}

Output:
Expand Down
6 changes: 3 additions & 3 deletions Documentation/Tutorials/XsltAndFluidtemplate/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ transformations we would like the data to go through. Just as in
TypoScript, the second level of this array is associative. The keys
reflect the according TypoScript properties.

.. attention::
.. attention::

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

You can only use the above five properties in the XSLT view helper.
You can use the following five properties in the XSLT view helper:

+----------------------+---------------------------------------------------------------+
| property | description |
Expand Down
12 changes: 6 additions & 6 deletions Documentation/Tutorials/XsltTypotag/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
.. important::

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

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

.. attention::

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

Configuration for a simple input field (TYPO3 7.6 and 8.7)
----------------------------------------------------------
Configuration for a simple input field (TYPO3 7.6 and 8.7-10.4)
---------------------------------------------------------------

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

Configuration for ckeditor (TYPO3 8.7)
--------------------------------------
Configuration for ckeditor (TYPO3 8.7-10.4)
-------------------------------------------

From this version onwards CKEditor is the new default RTE. Note that you can still use rtehtmlarea in TYPO3 8.7
but it is now a separate extension in TER. The integration of the <xslt> TypoTag into CKEditor is fully backwards
Expand Down
5 changes: 0 additions & 5 deletions Migrations/Code/ClassAliasMap.php

This file was deleted.

22 changes: 0 additions & 22 deletions Migrations/Code/LegacyClassesForIde.php

This file was deleted.

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ The documentation is at [https://docs.typo3.org/p/digicademy/cobj_xslt/master/en

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

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>
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>
29 changes: 10 additions & 19 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,20 @@
"type": "typo3-cms-extension",
"description": "Extends TYPO3 with a new content object XSLT for flexible XML transformations",
"homepage": "http://www.adwmainz.de/",
"authors": [
{
"name": "Torsten Schrade",
"email": "[email protected]",
"role": "Developer",
"homepage": "http://www.adwmainz.de"
}
],
"authors": [{
"name": "Torsten Schrade",
"email": "[email protected]",
"role": "Developer",
"homepage": "http://www.adwmainz.de"
}],
"license": ["GPL-2.0+"],
"keywords": ["TYPO3", "XML", "XSLT", "Digital Humanities"],
"support": {
"issues": "https://github.com/digicademy/cobj_xslt/issues"
},
"version": "1.9.0",
"version": "1.10.0",
"require": {
"typo3/cms-core": ">=8.7.0 || <=9.5.99",
"typo3/cms-core": ">=9.5.0 || <=10.4.99",
"ext-libxml": "*",
"ext-json": "*",
"ext-simplexml": "*",
Expand All @@ -31,14 +29,7 @@
},
"autoload": {
"psr-4": {
"Digicademy\\CobjXslt\\": "Classes/"
}
},
"extra": {
"typo3/class-alias-loader": {
"class-alias-maps": [
"Migrations/Code/ClassAliasMap.php"
]
"Digicademy\\CobjXslt\\": "Classes/"
}
}
}
}
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: '2'
version: '3'
services:
t3docmake:
image: t3docs/render-documentation:latest
command: makehtml
volumes:
- ./:/PROJECT:ro
- ./Documentation-GENERATED-temp:/RESULT
command: makehtml
- ./:/PROJECT:ro
- ./Documentation-GENERATED-temp:/RESULT
4 changes: 2 additions & 2 deletions ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
'clearCacheOnLoad' => 1,
'lockType' => '',
'author_company' => 'Academy of Sciences and Literature | Mainz',
'version' => '1.9.0',
'version' => '1.10.0',
'CGLcompliance' => '',
'CGLcompliance_note' => '',
'constraints' => array(
'depends' => array(
'typo3' => '8.7.0-9.5.99',
'typo3' => '9.5.0-10.4.99',
),
'conflicts' => array(),
'suggests' => array(
Expand Down
Loading

0 comments on commit 20001e2

Please sign in to comment.