Compare commits
9 Commits
0e15cad446
...
786c200609
Author | SHA1 | Date | |
---|---|---|---|
786c200609 | |||
7f3123b61a | |||
![]() |
d9e0ae6c44 | ||
fb54d608a6 | |||
94296d4a4d | |||
1a3aab9f36 | |||
![]() |
14b3a54a99 | ||
0045f87815 | |||
![]() |
9ba671cfd0 |
@ -170,22 +170,6 @@ class ActionController extends BaseController
|
||||
$this->environmentService = $environmentService;
|
||||
}
|
||||
|
||||
/**
|
||||
* propertyMapper
|
||||
*
|
||||
* @var PropertyMapper
|
||||
*/
|
||||
protected $propertyMapper;
|
||||
|
||||
/**
|
||||
* @param
|
||||
*/
|
||||
public function injectPropertyMapper(
|
||||
PropertyMapper $propertyMapper
|
||||
) {
|
||||
$this->propertyMapper = $propertyMapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* propertyMappingConfigurationBuilder
|
||||
*
|
||||
@ -776,11 +760,36 @@ class ActionController extends BaseController
|
||||
}
|
||||
if ($this->pageType) {
|
||||
if (is_array($this->responseStatus)) {
|
||||
$this->response->setStatus(
|
||||
array_key_first($this->responseStatus)
|
||||
);
|
||||
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
||||
$response = $this
|
||||
->responseFactory
|
||||
->createResponse()
|
||||
->withHeader(
|
||||
'Content-Type',
|
||||
'application/json; charset=utf-8'
|
||||
)
|
||||
->withStatus(
|
||||
array_key_first($this->responseStatus),
|
||||
''
|
||||
);
|
||||
} else {
|
||||
$this->response->setStatus(
|
||||
array_key_first($this->responseStatus)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$this->response->setStatus($this->responseStatus);
|
||||
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
||||
$response = $this
|
||||
->responseFactory
|
||||
->createResponse()
|
||||
->withHeader(
|
||||
'Content-Type',
|
||||
'application/json; charset=utf-8'
|
||||
)
|
||||
->withStatus($this->responseStatus, '');
|
||||
} else {
|
||||
$this->response->setStatus($this->responseStatus);
|
||||
}
|
||||
}
|
||||
if ($this->pageType == $this->ajaxPageType) {
|
||||
if ($this->environmentService->isEnvironmentInBackendMode()) {
|
||||
|
@ -41,9 +41,14 @@ class TranslationController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionCont
|
||||
$languageFactory = GeneralUtility::makeInstance(
|
||||
LocalizationFactory::class
|
||||
);
|
||||
$language = $this->request->getAttribute('language');
|
||||
$locale = $language->getLocale();
|
||||
//\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump(
|
||||
// $locale, '$locale', 3, true, false
|
||||
//);
|
||||
$langfileContent = $languageFactory->getParsedData(
|
||||
$langfilePath,
|
||||
$GLOBALS['LANG']->lang
|
||||
$locale
|
||||
);
|
||||
$langfileResult = [];
|
||||
foreach (reset($langfileContent) as $key => $row) {
|
||||
|
@ -102,11 +102,17 @@ trait DependencyInjectionTrait
|
||||
$frameworkConfiguration['persistence']['storagePid']
|
||||
)
|
||||
);
|
||||
$this->reflectionService = GeneralUtility::makeInstance(
|
||||
ReflectionService::class, GeneralUtility::makeInstance(
|
||||
CacheManager::class
|
||||
)
|
||||
);
|
||||
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
||||
$this->reflectionService = GeneralUtility::makeInstance(
|
||||
ReflectionService::class
|
||||
);
|
||||
} else {
|
||||
$this->reflectionService = GeneralUtility::makeInstance(
|
||||
ReflectionService::class, GeneralUtility::makeInstance(
|
||||
CacheManager::class
|
||||
)
|
||||
);
|
||||
}
|
||||
$classInfo = $this->reflectionService->getClassSchema(
|
||||
get_class($this)
|
||||
);
|
||||
|
@ -66,7 +66,7 @@ class TranslationViewHelper extends AbstractViewHelper
|
||||
$translation = LocalizationUtility::translate(
|
||||
$arguments['key'],
|
||||
$arguments['extensionKey'],
|
||||
$arguments['arguments']
|
||||
(array) $arguments['arguments']
|
||||
);
|
||||
if ($translation) {
|
||||
return $translation;
|
||||
|
14
Configuration/TCA/Overrides/tt_content.php
Normal file
14
Configuration/TCA/Overrides/tt_content.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
defined('TYPO3') || die();
|
||||
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
||||
'TemplatesAide',
|
||||
'Dummy',
|
||||
'dummy'
|
||||
);
|
||||
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
||||
'TemplatesAide',
|
||||
'Translationplugin',
|
||||
'translation'
|
||||
);
|
@ -18,6 +18,16 @@
|
||||
<f:variable name="buttonBackgroundcolor" value="#8ABF6F" />
|
||||
</f:else>
|
||||
</f:if>
|
||||
<f:if condition="{styleH1}">
|
||||
<f:else>
|
||||
<f:variable name="styleH1" value="" />
|
||||
</f:else>
|
||||
</f:if>
|
||||
<f:if condition="{styleButton}">
|
||||
<f:else>
|
||||
<f:variable name="styleButton" value="padding: 10px 15px; border-radius: 3px;" />
|
||||
</f:else>
|
||||
</f:if>
|
||||
<f:variable name="widthPadded" value="{width - padding - padding}" />
|
||||
<f:variable name="widthTableColumn" value="{widthPadded / 2}" />
|
||||
|
||||
@ -81,7 +91,7 @@
|
||||
<div style="font-family:Arial, sans-serif;font-size:16px;line-height:1.4;text-align:{align};color:#000000;">
|
||||
<f:switch expression="{row.type}">
|
||||
<f:case value="headline">
|
||||
<h1>{row.data -> f:format.nl2br() -> f:format.raw()}</h1>
|
||||
<h1 style="{styleH1}">{row.data -> f:format.nl2br() -> f:format.raw()}</h1>
|
||||
</f:case>
|
||||
<f:case value="headline2">
|
||||
<h2>{row.data -> f:format.nl2br() -> f:format.raw()}</h2>
|
||||
@ -103,7 +113,7 @@
|
||||
<span style="display: inline-block;" class="buttonwrapper">
|
||||
<f:variable name="rowData">{row.data -> v:format.json.decode()}</f:variable>
|
||||
<a style="display: inline-block; color: {buttonColor}" target="_blank" href="{rowData.0}">
|
||||
<span style="display: inline-block; padding: 10px 15px; border-radius: 3px; background-color: {buttonBackgroundcolor};">
|
||||
<span style="display: inline-block; background-color: {buttonBackgroundcolor}; {styleButton}">
|
||||
{rowData.1}
|
||||
</span>
|
||||
</a>
|
||||
|
@ -1,6 +1,3 @@
|
||||
#options.pageTree.showPageIdWithTitle = 1
|
||||
options.pageTree.showNavTitle = 1
|
||||
|
||||
options {
|
||||
folderTree {
|
||||
uploadFieldsInLinkBrowser = 0
|
||||
|
@ -9,7 +9,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"typo3/cms-core": "8.7.0 - 10.99.99",
|
||||
"typo3/cms-core": "8.7.0 - 11.99.99",
|
||||
"sarhan/php-flatten": "^4.0"
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -23,7 +23,6 @@ $EM_CONF[$_EXTKEY] = [
|
||||
'version' => '0.0.1',
|
||||
'constraints' => [
|
||||
'depends' => [
|
||||
'typo3' => '8.7.0-10.99.99',
|
||||
],
|
||||
'conflicts' => [],
|
||||
'suggests' => [],
|
||||
|
@ -1,36 +1,59 @@
|
||||
<?php
|
||||
defined('TYPO3_MODE') || die('Access denied.');
|
||||
|
||||
|
||||
(static function() {
|
||||
|
||||
|
||||
})();
|
||||
|
||||
call_user_func(
|
||||
function()
|
||||
{
|
||||
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
||||
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
|
||||
'Cjel.TemplatesAide',
|
||||
'Dummy',
|
||||
[
|
||||
'Dummy' => 'list',
|
||||
'Translation' => 'translations'
|
||||
],
|
||||
// non-cacheable actions
|
||||
[
|
||||
'Dummy' => '',
|
||||
'Translation' => ''
|
||||
]
|
||||
);
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
|
||||
'TemplatesAide',
|
||||
'Translationplugin',
|
||||
[
|
||||
\Cjel\TemplatesAide\Controller\TranslationController::class => 'translations'
|
||||
],
|
||||
// non-cacheable actions
|
||||
[
|
||||
\Cjel\TemplatesAide\Controller\TranslationController::class => ''
|
||||
]
|
||||
);
|
||||
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
|
||||
'Cjel.TemplatesAide',
|
||||
'Translationplugin',
|
||||
[
|
||||
'Translation' => 'translations'
|
||||
],
|
||||
// non-cacheable actions
|
||||
[
|
||||
'Dummy' => '',
|
||||
'Translation' => ''
|
||||
]
|
||||
);
|
||||
} else {
|
||||
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
|
||||
'Cjel.TemplatesAide',
|
||||
'Dummy',
|
||||
[
|
||||
'Dummy' => 'list',
|
||||
'Translation' => 'translations'
|
||||
],
|
||||
// non-cacheable actions
|
||||
[
|
||||
'Dummy' => '',
|
||||
'Translation' => ''
|
||||
]
|
||||
);
|
||||
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
|
||||
'Cjel.TemplatesAide',
|
||||
'Translationplugin',
|
||||
[
|
||||
'Translation' => 'translations'
|
||||
],
|
||||
// non-cacheable actions
|
||||
[
|
||||
'Dummy' => '',
|
||||
'Translation' => ''
|
||||
]
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
// wizards
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
|
||||
|
@ -39,14 +39,25 @@ call_user_func(
|
||||
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook'][] =
|
||||
\Cjel\TemplatesAide\Hooks\WizardItems::class;
|
||||
|
||||
if(\TYPO3\CMS\Core\Utility\GeneralUtility::getApplicationContext()->isDevelopment()) {
|
||||
$GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['dev'] =
|
||||
'EXT:templates_aide/Resources/Public/Css/backend/dev';
|
||||
}
|
||||
|
||||
if(\TYPO3\CMS\Core\Utility\GeneralUtility::getApplicationContext()->__toString() === 'Production/Stage') {
|
||||
$GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['dev'] =
|
||||
'EXT:templates_aide/Resources/Public/Css/backend/production-stage';
|
||||
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
||||
if (\TYPO3\CMS\Core\Core\Environment::getContext()->isDevelopment()) {
|
||||
$GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['dev'] =
|
||||
'EXT:templates_aide/Resources/Public/Css/backend/dev';
|
||||
}
|
||||
if(\TYPO3\CMS\Core\Core\Environment::getContext()->__toString() === 'Production/Stage') {
|
||||
$GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['dev'] =
|
||||
'EXT:templates_aide/Resources/Public/Css/backend/production-stage';
|
||||
}
|
||||
} else {
|
||||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::getApplicationContext()->isDevelopment()) {
|
||||
$GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['dev'] =
|
||||
'EXT:templates_aide/Resources/Public/Css/backend/dev';
|
||||
}
|
||||
if(\TYPO3\CMS\Core\Utility\GeneralUtility::getApplicationContext()->__toString() === 'Production/Stage') {
|
||||
$GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['dev'] =
|
||||
'EXT:templates_aide/Resources/Public/Css/backend/production-stage';
|
||||
}
|
||||
}
|
||||
|
||||
$GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['templates_aide_default'] =
|
||||
|
Loading…
x
Reference in New Issue
Block a user