Skip to content

Commit

Permalink
Merge branch 'release/1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
misterboe committed Nov 3, 2017
2 parents 15886c9 + dd358f0 commit 61cb68b
Show file tree
Hide file tree
Showing 169 changed files with 15,383 additions and 6,739 deletions.
8 changes: 2 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
.idea
.DS_Store
/Resources/Gulp/node_modules/
/Resources/Gulp/bower_components/
/Resources/Public/Css/style.min.css.map
/Resources/Public/Css/style.min.css
/Resources/Public/JavaScript/config.min.js
/Resources/Public/JavaScript/vendor.min.js
/Resources/Build/node_modules/
/Resources/Public/
/Resources/Gulp/package-lock.json
92 changes: 92 additions & 0 deletions Classes/ViewHelpers/Format/DateViewHelper.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?php
namespace Vendor\Yourext\ViewHelpers\Format;

/**
* Formats a \DateTime object.
*
* = Examples =
*
* {namespace s=Vendor\Yourext\ViewHelpers}
*
* Default Date
* {dateObject -> s:format.date()}
*
* With Type Config
* {dateObject -> s:format.date(type:'medium')}
*
* <s:format.date type="long">{dateObject}</ma:format.date>
*
*
* = Required TypoScript-Configuration =
*
* config {
* format {
* date.short = %d.%m.%Y
* date.medium = %d. %b %Y
* date.long = %A, %d. %b %Y
* time = %H:%M
* }
* }
*/

use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;

/**
* Class DateViewHelper
*
* @package Vendor\Yourext\ViewHelpers\Format
*/
class DateViewHelper extends AbstractViewHelper
{

/**
* @var bool
*/
protected $escapingInterceptorEnabled = false;

/**
* @var \TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager
*/
protected $frontendConfigurationManager;

/**
* Render the supplied DateTime object as a formatted date.
*
* @param mixed $date either a DateTime object or a string that is accepted by DateTime constructor
* @param string $type One of short, medium, long
* @throws \TYPO3\CMS\Fluid\Core\ViewHelper\Exception
* @return string Formatted date
*/
public function render($date = null, $type = null)
{
$type = (empty($type)) ? 'short' : $type;
$this->frontendConfigurationManager = new \TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager;
$config = $this->frontendConfigurationManager->getTypoScriptSetup();
$format = $config['config.']['format.']['date.'][$type];

if (empty($format)) {
return;
}

if ($date === null) {
$date = $this->renderChildren();

if ($date === null) {
return '';
}
}

if (!$date instanceof \DateTime) {
try {
$date = is_integer($date) ? new \DateTime('@' . $date) : new \DateTime($date);
$date->setTimezone(new \DateTimeZone(date_default_timezone_get()));
} catch (\Exception $exception) {
throw new \Exception(
'"' . $date . '" could not be parsed by \DateTime constructor.', 1241722579
);
}
}

return strpos($format, '%') !== false ? strftime($format, $date->format('U')) : $date->format($format);
}
}
47 changes: 0 additions & 47 deletions Configuration/PageTS/Backend_Layouts.t3s

This file was deleted.

19 changes: 0 additions & 19 deletions Configuration/PageTS/PageTS.t3s

This file was deleted.

6 changes: 3 additions & 3 deletions Configuration/RTE/Bootstrap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ imports:

editor:
externalPlugins:
wordcount: { resource: "EXT:startpilot/Resources/Public/ckeditor/wordcount/", showParagraphs: true, showCharCount: true, showWordCount: true, pasteWarningDuration: 3000 }
notification: { resource: "EXT:startpilot/Resources/Public/ckeditor/notification/" }
wordcount: { resource: "EXT:startpilot/Resources/Public/CKEditor/wordcount/", showParagraphs: true, showCharCount: true, showWordCount: true, pasteWarningDuration: 3000 }
notification: { resource: "EXT:startpilot/Resources/Public/CKEditor/notification/" }

config:
defaultContentLanguage: "de"
contentsCss: "EXT:startpilot/Resources/Public/Css/RTE/ckeditor.min.css"
contentsCss: "EXT:startpilot/Resources/Public/Css/ckeditor.min.css"

stylesSet:
- { name: "Table", element: "table", attributes: { 'class': 'table table-hover' } }
Expand Down
8 changes: 8 additions & 0 deletions Configuration/TCA/sys_template.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php
defined('TYPO3_MODE') or die();

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
'startpilot',
'Configuration/TypoScript',
'Startpilot'
);
10 changes: 6 additions & 4 deletions Configuration/TCA/tt_content.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;

ExtensionManagementUtility::addTcaSelectItem(
'tt_content',
'CType',
[
Expand All @@ -13,7 +15,7 @@

$global_fields = array();

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', $global_fields);
ExtensionManagementUtility::addTCAcolumns('tt_content', $global_fields);

$showitem_default_01 = '--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.general;general,
Expand All @@ -27,9 +29,9 @@
--palette--;;hidden,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.access;access,
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:categories,
categories,
categories,
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:notes,
rowDescription,
rowDescription,
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:extended,
';

Expand Down
49 changes: 26 additions & 23 deletions Configuration/TCA/tt_content_textimage.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,41 @@
* Startpilot Content Element | startpilot_textimage
*/

use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;

/***************
* Register fields
*/
$startpilot_textimage_fields = array(
'imageposition' => array(
$startpilot_textimage_fields = [
'imageposition' => [
'exclude' => 0,
'label' => 'LLL:EXT:startpilot/Resources/Private/Language/locallang.xlf:startpilot_textimage_dropdown.title',
'config' => array(
'config' => [
'type' => 'select',
'items' => array(
array(
'renderType' => 'selectSingle',
'items' => [
[
'LLL:EXT:startpilot/Resources/Private/Language/locallang.xlf:startpilot_textimage_dropdown.option1',
'top'
),
array(
],
[
'LLL:EXT:startpilot/Resources/Private/Language/locallang.xlf:startpilot_textimage_dropdown.option2',
'bottom'
),
array(
],
[
'LLL:EXT:startpilot/Resources/Private/Language/locallang.xlf:startpilot_textimage_dropdown.option3',
'right'
),
array(
],
[
'LLL:EXT:startpilot/Resources/Private/Language/locallang.xlf:startpilot_textimage_dropdown.option4',
'left'
),
)
),
),
);
],
]
],
],
];

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', $startpilot_textimage_fields);
ExtensionManagementUtility::addTCAcolumns('tt_content', $startpilot_textimage_fields);

/***************
* Add Content Element: startpilot_textimage
Expand All @@ -46,7 +49,7 @@
/***************
* Add content element to seletor list
*/
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
ExtensionManagementUtility::addTcaSelectItem(
'tt_content',
'CType',
[
Expand Down Expand Up @@ -83,15 +86,15 @@
'richtextConfiguration' => 'default'
]
],
'image' => array(
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'image' => [
'config' => ExtensionManagementUtility::getFileFieldTCAConfig(
'image',
array(
[
'collapseAll' => 1,
'maxitems' => 1,
)
]
),
),
],
]
]
);
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ mod.wizards {
}
}

mod.web_layout.tt_content.preview.startpilot_textimage = EXT:startpilot/Resources/Private/BackendPreviews/BE_Textimage.html
mod.web_layout.tt_content.preview.startpilot_textimage = EXT:startpilot/Resources/Private/ContentElements/BackendPreviews/BE_Textimage.html
2 changes: 2 additions & 0 deletions Configuration/TSconfig/TCAdefaults.tsconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## https as default ##
#TCAdefaults.pages.url_scheme = 2
Loading

0 comments on commit 61cb68b

Please sign in to comment.