Skip to content

Commit 61cb68b

Browse files
committed
Merge branch 'release/1.0.0'
2 parents 15886c9 + dd358f0 commit 61cb68b

File tree

169 files changed

+15383
-6739
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+15383
-6739
lines changed

.gitignore

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
.idea
22
.DS_Store
3-
/Resources/Gulp/node_modules/
4-
/Resources/Gulp/bower_components/
5-
/Resources/Public/Css/style.min.css.map
6-
/Resources/Public/Css/style.min.css
7-
/Resources/Public/JavaScript/config.min.js
8-
/Resources/Public/JavaScript/vendor.min.js
3+
/Resources/Build/node_modules/
4+
/Resources/Public/
95
/Resources/Gulp/package-lock.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
<?php
2+
namespace Vendor\Yourext\ViewHelpers\Format;
3+
4+
/**
5+
* Formats a \DateTime object.
6+
*
7+
* = Examples =
8+
*
9+
* {namespace s=Vendor\Yourext\ViewHelpers}
10+
*
11+
* Default Date
12+
* {dateObject -> s:format.date()}
13+
*
14+
* With Type Config
15+
* {dateObject -> s:format.date(type:'medium')}
16+
*
17+
* <s:format.date type="long">{dateObject}</ma:format.date>
18+
*
19+
*
20+
* = Required TypoScript-Configuration =
21+
*
22+
* config {
23+
* format {
24+
* date.short = %d.%m.%Y
25+
* date.medium = %d. %b %Y
26+
* date.long = %A, %d. %b %Y
27+
* time = %H:%M
28+
* }
29+
* }
30+
*/
31+
32+
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
33+
34+
/**
35+
* Class DateViewHelper
36+
*
37+
* @package Vendor\Yourext\ViewHelpers\Format
38+
*/
39+
class DateViewHelper extends AbstractViewHelper
40+
{
41+
42+
/**
43+
* @var bool
44+
*/
45+
protected $escapingInterceptorEnabled = false;
46+
47+
/**
48+
* @var \TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager
49+
*/
50+
protected $frontendConfigurationManager;
51+
52+
/**
53+
* Render the supplied DateTime object as a formatted date.
54+
*
55+
* @param mixed $date either a DateTime object or a string that is accepted by DateTime constructor
56+
* @param string $type One of short, medium, long
57+
* @throws \TYPO3\CMS\Fluid\Core\ViewHelper\Exception
58+
* @return string Formatted date
59+
*/
60+
public function render($date = null, $type = null)
61+
{
62+
$type = (empty($type)) ? 'short' : $type;
63+
$this->frontendConfigurationManager = new \TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager;
64+
$config = $this->frontendConfigurationManager->getTypoScriptSetup();
65+
$format = $config['config.']['format.']['date.'][$type];
66+
67+
if (empty($format)) {
68+
return;
69+
}
70+
71+
if ($date === null) {
72+
$date = $this->renderChildren();
73+
74+
if ($date === null) {
75+
return '';
76+
}
77+
}
78+
79+
if (!$date instanceof \DateTime) {
80+
try {
81+
$date = is_integer($date) ? new \DateTime('@' . $date) : new \DateTime($date);
82+
$date->setTimezone(new \DateTimeZone(date_default_timezone_get()));
83+
} catch (\Exception $exception) {
84+
throw new \Exception(
85+
'"' . $date . '" could not be parsed by \DateTime constructor.', 1241722579
86+
);
87+
}
88+
}
89+
90+
return strpos($format, '%') !== false ? strftime($format, $date->format('U')) : $date->format($format);
91+
}
92+
}

Configuration/PageTS/Backend_Layouts.t3s

-47
This file was deleted.

Configuration/PageTS/PageTS.t3s

-19
This file was deleted.

Configuration/RTE/Bootstrap.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ imports:
55

66
editor:
77
externalPlugins:
8-
wordcount: { resource: "EXT:startpilot/Resources/Public/ckeditor/wordcount/", showParagraphs: true, showCharCount: true, showWordCount: true, pasteWarningDuration: 3000 }
9-
notification: { resource: "EXT:startpilot/Resources/Public/ckeditor/notification/" }
8+
wordcount: { resource: "EXT:startpilot/Resources/Public/CKEditor/wordcount/", showParagraphs: true, showCharCount: true, showWordCount: true, pasteWarningDuration: 3000 }
9+
notification: { resource: "EXT:startpilot/Resources/Public/CKEditor/notification/" }
1010

1111
config:
1212
defaultContentLanguage: "de"
13-
contentsCss: "EXT:startpilot/Resources/Public/Css/RTE/ckeditor.min.css"
13+
contentsCss: "EXT:startpilot/Resources/Public/Css/ckeditor.min.css"
1414

1515
stylesSet:
1616
- { name: "Table", element: "table", attributes: { 'class': 'table table-hover' } }

Configuration/TCA/sys_template.php

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
defined('TYPO3_MODE') or die();
3+
4+
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
5+
'startpilot',
6+
'Configuration/TypoScript',
7+
'Startpilot'
8+
);

Configuration/TCA/tt_content.php

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
22

3-
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
3+
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
4+
5+
ExtensionManagementUtility::addTcaSelectItem(
46
'tt_content',
57
'CType',
68
[
@@ -13,7 +15,7 @@
1315

1416
$global_fields = array();
1517

16-
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', $global_fields);
18+
ExtensionManagementUtility::addTCAcolumns('tt_content', $global_fields);
1719

1820
$showitem_default_01 = '--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
1921
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.general;general,
@@ -27,9 +29,9 @@
2729
--palette--;;hidden,
2830
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.access;access,
2931
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:categories,
30-
categories,
32+
categories,
3133
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:notes,
32-
rowDescription,
34+
rowDescription,
3335
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:extended,
3436
';
3537

Configuration/TCA/tt_content_textimage.php

+26-23
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,41 @@
33
* Startpilot Content Element | startpilot_textimage
44
*/
55

6+
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
7+
68
/***************
79
* Register fields
810
*/
9-
$startpilot_textimage_fields = array(
10-
'imageposition' => array(
11+
$startpilot_textimage_fields = [
12+
'imageposition' => [
1113
'exclude' => 0,
1214
'label' => 'LLL:EXT:startpilot/Resources/Private/Language/locallang.xlf:startpilot_textimage_dropdown.title',
13-
'config' => array(
15+
'config' => [
1416
'type' => 'select',
15-
'items' => array(
16-
array(
17+
'renderType' => 'selectSingle',
18+
'items' => [
19+
[
1720
'LLL:EXT:startpilot/Resources/Private/Language/locallang.xlf:startpilot_textimage_dropdown.option1',
1821
'top'
19-
),
20-
array(
22+
],
23+
[
2124
'LLL:EXT:startpilot/Resources/Private/Language/locallang.xlf:startpilot_textimage_dropdown.option2',
2225
'bottom'
23-
),
24-
array(
26+
],
27+
[
2528
'LLL:EXT:startpilot/Resources/Private/Language/locallang.xlf:startpilot_textimage_dropdown.option3',
2629
'right'
27-
),
28-
array(
30+
],
31+
[
2932
'LLL:EXT:startpilot/Resources/Private/Language/locallang.xlf:startpilot_textimage_dropdown.option4',
3033
'left'
31-
),
32-
)
33-
),
34-
),
35-
);
34+
],
35+
]
36+
],
37+
],
38+
];
3639

37-
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', $startpilot_textimage_fields);
40+
ExtensionManagementUtility::addTCAcolumns('tt_content', $startpilot_textimage_fields);
3841

3942
/***************
4043
* Add Content Element: startpilot_textimage
@@ -46,7 +49,7 @@
4649
/***************
4750
* Add content element to seletor list
4851
*/
49-
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
52+
ExtensionManagementUtility::addTcaSelectItem(
5053
'tt_content',
5154
'CType',
5255
[
@@ -83,15 +86,15 @@
8386
'richtextConfiguration' => 'default'
8487
]
8588
],
86-
'image' => array(
87-
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
89+
'image' => [
90+
'config' => ExtensionManagementUtility::getFileFieldTCAConfig(
8891
'image',
89-
array(
92+
[
9093
'collapseAll' => 1,
9194
'maxitems' => 1,
92-
)
95+
]
9396
),
94-
),
97+
],
9598
]
9699
]
97100
);

Configuration/PageTS/ContentElements/pagets_textimage.t3s Configuration/TSconfig/ContentElements/textimage.tsconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ mod.wizards {
1717
}
1818
}
1919

20-
mod.web_layout.tt_content.preview.startpilot_textimage = EXT:startpilot/Resources/Private/BackendPreviews/BE_Textimage.html
20+
mod.web_layout.tt_content.preview.startpilot_textimage = EXT:startpilot/Resources/Private/ContentElements/BackendPreviews/BE_Textimage.html
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
## https as default ##
2+
#TCAdefaults.pages.url_scheme = 2

0 commit comments

Comments
 (0)