1
1
<?php
2
+ declare (strict_types=1 );
3
+
2
4
namespace Flownative \Neos \Trados \Command ;
3
5
4
6
/*
23
25
*/
24
26
class TradosCommandController extends CommandController
25
27
{
26
-
27
28
/**
28
29
* @Flow\Inject
29
30
* @var ExportService
@@ -37,21 +38,21 @@ class TradosCommandController extends CommandController
37
38
protected $ importService ;
38
39
39
40
/**
40
- * Export sites content (e.g. trados:export --filename " acme.com.xml" --source-language "en" -- target-language "cz" )
41
+ * Export sites content (e.g. trados:export --filename acme.com.xml --target-language cz amecom en )
41
42
*
42
43
* This command exports a specific site including all content into an XML format.
43
44
*
44
45
* @param string $startingPoint The node with which to start the export: as identifier or the path relative to the site node.
45
46
* @param string $sourceLanguage The language to use as base for the export.
46
47
* @param string|null $targetLanguage The target language for the translation, optional.
47
48
* @param string|null $filename Path and filename to the XML file to create.
48
- * @param string|null $modifiedAfter
49
- * @param boolean $ignoreHidden
50
- * @param boolean $excludeChildDocuments
49
+ * @param string|null $modifiedAfter A date/time to filter for nodes by modification time; anything PHP can parse in the DateTime constructor.
50
+ * @param bool $ignoreHidden If set to false, hidden nodes will be exported, too.
51
+ * @param bool $excludeChildDocuments If set to true, child documents will not be exported; use to export a single document's content.
51
52
* @return void
52
53
* @throws \Exception
53
54
*/
54
- public function exportCommand (string $ startingPoint , string $ sourceLanguage , string $ targetLanguage = null , string $ filename = null , string $ modifiedAfter = null , bool $ ignoreHidden = true , bool $ excludeChildDocuments = false )
55
+ public function exportCommand (string $ startingPoint , string $ sourceLanguage , string $ targetLanguage = null , string $ filename = null , string $ modifiedAfter = null , bool $ ignoreHidden = true , bool $ excludeChildDocuments = false ): void
55
56
{
56
57
if ($ modifiedAfter !== null ) {
57
58
$ modifiedAfter = new \DateTime ($ modifiedAfter );
@@ -81,7 +82,7 @@ public function exportCommand(string $startingPoint, string $sourceLanguage, str
81
82
* @param string|null $targetLanguage The target language for the translation, optional if included in XML.
82
83
* @param string $workspace A workspace to import into, optional but recommended
83
84
*/
84
- public function importCommand (string $ filename , string $ targetLanguage = null , string $ workspace = 'live ' )
85
+ public function importCommand (string $ filename , string $ targetLanguage = null , string $ workspace = 'live ' ): void
85
86
{
86
87
try {
87
88
$ importedLanguage = $ this ->importService ->importFromFile ($ filename , $ workspace , $ targetLanguage );
0 commit comments