-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
169 changed files
with
15,383 additions
and
6,739 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
## https as default ## | ||
#TCAdefaults.pages.url_scheme = 2 |
Oops, something went wrong.