Compare commits
5 Commits
master
...
task-updat
Author | SHA1 | Date | |
---|---|---|---|
9108dab451 | |||
5cf947a1da | |||
6388fd7bb0 | |||
14e1490a22 | |||
![]() |
a02b1bb939 |
@ -95,10 +95,10 @@ class AbstractCommandController extends Commands
|
|||||||
ObjectManager::class
|
ObjectManager::class
|
||||||
);
|
);
|
||||||
$this->initFrontendController();
|
$this->initFrontendController();
|
||||||
$this->configurationManager = $this->objectManager->get(
|
$this->configurationManager = GeneralUtility::makeInstance(
|
||||||
ConfigurationManagerInterface::class
|
ConfigurationManagerInterface::class
|
||||||
);
|
);
|
||||||
$this->apiUtility = $this->objectManager->get(
|
$this->apiUtility = GeneralUtility::makeInstance(
|
||||||
\Cjel\TemplatesAide\Utility\ApiUtility::class
|
\Cjel\TemplatesAide\Utility\ApiUtility::class
|
||||||
);
|
);
|
||||||
$this->configurationManager->setConfiguration(array());
|
$this->configurationManager->setConfiguration(array());
|
||||||
@ -115,7 +115,7 @@ class AbstractCommandController extends Commands
|
|||||||
$frameworkConfiguration['persistence']['storagePid']
|
$frameworkConfiguration['persistence']['storagePid']
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$this->logManager = $this->objectManager->get(
|
$this->logManager = GeneralUtility::makeInstance(
|
||||||
LogManager::Class
|
LogManager::Class
|
||||||
);
|
);
|
||||||
$this->importLogger = $this->logManager->getLogger(
|
$this->importLogger = $this->logManager->getLogger(
|
||||||
@ -130,7 +130,7 @@ class AbstractCommandController extends Commands
|
|||||||
get_class($this)
|
get_class($this)
|
||||||
);
|
);
|
||||||
foreach ($classInfo->getInjectMethods() as $method => $className) {
|
foreach ($classInfo->getInjectMethods() as $method => $className) {
|
||||||
$class = $this->objectManager->get(
|
$class = GeneralUtility::makeInstance(
|
||||||
$className
|
$className
|
||||||
);
|
);
|
||||||
$this->{$method}($class);
|
$this->{$method}($class);
|
||||||
|
@ -17,19 +17,11 @@ use Cjel\TemplatesAide\Traits\ValidationTrait;
|
|||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
use Psr\Http\Message\ServerRequestInterface;
|
use Psr\Http\Message\ServerRequestInterface;
|
||||||
use TYPO3\CMS\Core\Cache\CacheManager;
|
use TYPO3\CMS\Core\Cache\CacheManager;
|
||||||
use TYPO3\CMS\Core\Context\Context;
|
|
||||||
use TYPO3\CMS\Core\Database\ConnectionPool;
|
use TYPO3\CMS\Core\Database\ConnectionPool;
|
||||||
use TYPO3\CMS\Core\Database\Query\Restriction\DefaultRestrictionContainer;
|
use TYPO3\CMS\Core\Database\Query\Restriction\DefaultRestrictionContainer;
|
||||||
use TYPO3\CMS\Core\Http\Response;
|
|
||||||
use TYPO3\CMS\Core\Http\ServerRequestFactory;
|
|
||||||
use TYPO3\CMS\Core\Localization\LanguageService;
|
use TYPO3\CMS\Core\Localization\LanguageService;
|
||||||
use TYPO3\CMS\Core\Localization\LanguageServiceFactory;
|
|
||||||
use TYPO3\CMS\Core\Log\LogManager;
|
use TYPO3\CMS\Core\Log\LogManager;
|
||||||
use TYPO3\CMS\Core\Routing\SiteMatcher;
|
|
||||||
use TYPO3\CMS\Core\Site\SiteFinder;
|
|
||||||
use TYPO3\CMS\Core\TypoScript\TemplateService;
|
|
||||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||||
use TYPO3\CMS\Core\Utility\RootlineUtility;
|
|
||||||
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
||||||
use TYPO3\CMS\Extbase\Object\ObjectManager;
|
use TYPO3\CMS\Extbase\Object\ObjectManager;
|
||||||
use TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper;
|
use TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper;
|
||||||
@ -39,6 +31,13 @@ use TYPO3\CMS\Extbase\Reflection\ReflectionService;
|
|||||||
use TYPO3\CMS\Frontend\Plugin\AbstractPlugin;
|
use TYPO3\CMS\Frontend\Plugin\AbstractPlugin;
|
||||||
use TYPO3\CMS\Frontend\Utility\EidUtility;
|
use TYPO3\CMS\Frontend\Utility\EidUtility;
|
||||||
|
|
||||||
|
use TYPO3\CMS\Core\Context\Context;
|
||||||
|
use TYPO3\CMS\Core\Http\ResponseFactory;
|
||||||
|
use TYPO3\CMS\Core\Routing\PageArguments;
|
||||||
|
use TYPO3\CMS\Core\Site\SiteFinder;
|
||||||
|
use TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication;
|
||||||
|
use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AbstractEIDController
|
* AbstractEIDController
|
||||||
*/
|
*/
|
||||||
@ -128,10 +127,10 @@ class AbstractEIDController
|
|||||||
ObjectManager::class
|
ObjectManager::class
|
||||||
);
|
);
|
||||||
$this->initFrontendController();
|
$this->initFrontendController();
|
||||||
$this->configurationManager = $this->objectManager->get(
|
$this->configurationManager = GeneralUtility::makeInstance(
|
||||||
ConfigurationManagerInterface::class
|
ConfigurationManagerInterface::class
|
||||||
);
|
);
|
||||||
$this->apiUtility = $this->objectManager->get(
|
$this->apiUtility = GeneralUtility::makeInstance(
|
||||||
\Cjel\TemplatesAide\Utility\ApiUtility::class
|
\Cjel\TemplatesAide\Utility\ApiUtility::class
|
||||||
);
|
);
|
||||||
$frameworkConfiguration = $this->configurationManager->getConfiguration(
|
$frameworkConfiguration = $this->configurationManager->getConfiguration(
|
||||||
@ -150,23 +149,15 @@ class AbstractEIDController
|
|||||||
$frameworkConfiguration['persistence']['storagePid']
|
$frameworkConfiguration['persistence']['storagePid']
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$this->logManager = $this->objectManager->get(
|
$this->logManager = GeneralUtility::makeInstance(
|
||||||
LogManager::Class
|
LogManager::Class
|
||||||
);
|
);
|
||||||
$this->importLogger = $this->logManager->getLogger(
|
$this->importLogger = $this->logManager->getLogger(
|
||||||
'importLogger'
|
'importLogger'
|
||||||
);
|
);
|
||||||
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
|
||||||
$this->reflectionService = GeneralUtility::makeInstance(
|
$this->reflectionService = GeneralUtility::makeInstance(
|
||||||
ReflectionService::class
|
ReflectionService::class
|
||||||
);
|
);
|
||||||
} else {
|
|
||||||
$this->reflectionService = GeneralUtility::makeInstance(
|
|
||||||
ReflectionService::class, GeneralUtility::makeInstance(
|
|
||||||
CacheManager::class
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
$classInfo = $this->reflectionService->getClassSchema(
|
$classInfo = $this->reflectionService->getClassSchema(
|
||||||
get_class($this)
|
get_class($this)
|
||||||
);
|
);
|
||||||
@ -176,7 +167,7 @@ class AbstractEIDController
|
|||||||
->getFirstParameter()
|
->getFirstParameter()
|
||||||
->getDependency();
|
->getDependency();
|
||||||
}
|
}
|
||||||
$class = $this->objectManager->get(
|
$class = GeneralUtility::makeInstance(
|
||||||
$className
|
$className
|
||||||
);
|
);
|
||||||
$this->{$method}($class);
|
$this->{$method}($class);
|
||||||
@ -188,37 +179,77 @@ class AbstractEIDController
|
|||||||
*/
|
*/
|
||||||
private function initFrontendController()
|
private function initFrontendController()
|
||||||
{
|
{
|
||||||
$request = ServerRequestFactory::fromGlobals();
|
$currentDomain = strtok(GeneralUtility::getIndpEnv('HTTP_HOST'), ':');
|
||||||
|
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
|
||||||
|
->getQueryBuilderForTable('sys_domain');
|
||||||
|
$queryBuilder->setRestrictions(
|
||||||
|
GeneralUtility::makeInstance(DefaultRestrictionContainer::class)
|
||||||
|
);
|
||||||
|
$result = $queryBuilder
|
||||||
|
->select('uid', 'pid', 'domainName')
|
||||||
|
->from('sys_domain')
|
||||||
|
->where(
|
||||||
|
$queryBuilder->expr()->eq(
|
||||||
|
'domainName',
|
||||||
|
$queryBuilder->createNamedParameter(
|
||||||
|
$currentDomain,
|
||||||
|
\PDO::PARAM_STR
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
->orderBy('sorting', 'ASC')
|
||||||
|
->execute()
|
||||||
|
->fetchAll();
|
||||||
|
//if (count($result) < 1) {
|
||||||
|
// throw new \Exception('Domain not configured');
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
$context = GeneralUtility::makeInstance(Context::class);
|
$context = GeneralUtility::makeInstance(Context::class);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$siteFinder = GeneralUtility::makeInstance(SiteFinder::class);
|
$siteFinder = GeneralUtility::makeInstance(SiteFinder::class);
|
||||||
$siteMatcher = GeneralUtility::makeInstance(SiteMatcher::class);
|
$site = $siteFinder->getSiteByPageId(1049);
|
||||||
$site = $siteMatcher->matchRequest($request);
|
|
||||||
$pageId = $site->getSite()->getRootPageId();
|
$siteLanguage = reset($site->getLanguages());
|
||||||
$template = GeneralUtility::makeInstance(TemplateService::class);
|
|
||||||
$template->tt_track = false;
|
$pageArguments = GeneralUtility::makeInstance(
|
||||||
$rootline = GeneralUtility::makeInstance(
|
PageArguments::class,
|
||||||
RootlineUtility::class, $pageId
|
1049,
|
||||||
)->get();
|
'0',
|
||||||
$template->runThroughTemplates($rootline, 0);
|
[]
|
||||||
$template->generateConfig();
|
|
||||||
$setup = $template->setup;
|
|
||||||
$setup = GeneralUtility::removeDotsFromTS($setup);
|
|
||||||
$extKey = 'tx_' . $this->getExtensionKey();
|
|
||||||
if (array_key_exists('plugin', $setup)
|
|
||||||
&& array_key_exists($extKey, $setup['plugin'])
|
|
||||||
&& array_key_exists('persistence', $setup['plugin'][$extKey])
|
|
||||||
&& array_key_exists('storagePid', $setup['plugin'][$extKey]['persistence'])
|
|
||||||
) {
|
|
||||||
$storagePids = $setup['plugin'][$extKey]['persistence']['storagePid'];
|
|
||||||
$this->storagePids = GeneralUtility::trimExplode(
|
|
||||||
',',
|
|
||||||
$storagePids
|
|
||||||
);
|
);
|
||||||
}
|
|
||||||
$languageServiceFactory = GeneralUtility::makeInstance(
|
$frontendUser = GeneralUtility::makeInstance(
|
||||||
LanguageServiceFactory::class
|
FrontendUserAuthentication::class
|
||||||
);
|
);
|
||||||
$GLOBALS['LANG'] = $languageServiceFactory->create('default');
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$frontendController = GeneralUtility::makeInstance(
|
||||||
|
TypoScriptFrontendController::class,
|
||||||
|
$context,
|
||||||
|
$site,
|
||||||
|
$siteLanguage,
|
||||||
|
$pageArguments,
|
||||||
|
$frontendUser
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
//die;
|
||||||
|
$GLOBALS['LANG'] = GeneralUtility::makeInstance(LanguageService::class);
|
||||||
|
$GLOBALS['LANG']->init('default');
|
||||||
|
$GLOBALS['TSFE'] = $frontendController;
|
||||||
|
//$frontendController->connectToDB();
|
||||||
|
//$frontendController->fe_user = EidUtility::initFeUser();
|
||||||
|
//$frontendController->id = 1049;
|
||||||
|
$frontendController->determineId();
|
||||||
|
//$frontendController->initTemplate();
|
||||||
|
$frontendController->getConfigArray();
|
||||||
|
//EidUtility::initTCA();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -235,6 +266,12 @@ class AbstractEIDController
|
|||||||
ServerRequestInterface $request,
|
ServerRequestInterface $request,
|
||||||
ResponseInterface $response = null
|
ResponseInterface $response = null
|
||||||
) {
|
) {
|
||||||
|
if (!$response) {
|
||||||
|
$responseFactory = GeneralUtility::makeInstance(
|
||||||
|
ResponseFactory::class
|
||||||
|
);
|
||||||
|
$response = $responseFactory->createResponse();
|
||||||
|
}
|
||||||
$apiObject = explode('/', $request->getUri()->getPath())[3];
|
$apiObject = explode('/', $request->getUri()->getPath())[3];
|
||||||
$apiObjectId = explode('/', $request->getUri()->getPath())[4];
|
$apiObjectId = explode('/', $request->getUri()->getPath())[4];
|
||||||
if (!$apiObject) {
|
if (!$apiObject) {
|
||||||
@ -280,7 +317,6 @@ class AbstractEIDController
|
|||||||
. 'Request';
|
. 'Request';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$response = new Response();
|
|
||||||
if (method_exists($this, $requestMethod)) {
|
if (method_exists($this, $requestMethod)) {
|
||||||
$responseData = $this->$requestMethod($request, $response);
|
$responseData = $this->$requestMethod($request, $response);
|
||||||
$response = $response->withHeader(
|
$response = $response->withHeader(
|
||||||
@ -316,7 +352,7 @@ class AbstractEIDController
|
|||||||
*/
|
*/
|
||||||
public function persistAll()
|
public function persistAll()
|
||||||
{
|
{
|
||||||
($this->objectManager->get(
|
(GeneralUtility::makeInstance(
|
||||||
PersistenceManager::class
|
PersistenceManager::class
|
||||||
))->persistAll();
|
))->persistAll();
|
||||||
}
|
}
|
||||||
|
@ -27,9 +27,8 @@ use TYPO3\CMS\Extbase\Property\PropertyMappingConfigurationBuilder;
|
|||||||
use TYPO3\CMS\Extbase\Service\EnvironmentService;
|
use TYPO3\CMS\Extbase\Service\EnvironmentService;
|
||||||
use TYPO3\CMS\Extbase\Service\ExtensionService;
|
use TYPO3\CMS\Extbase\Service\ExtensionService;
|
||||||
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
|
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
|
||||||
use Blueways\BwCaptcha\Validation\Validator\CaptchaValidator;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
use TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication;
|
use TYPO3\CMS\Core\Http\RequestFactory;
|
||||||
|
|
||||||
class ActionController extends BaseController
|
class ActionController extends BaseController
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -123,10 +122,7 @@ class ActionController extends BaseController
|
|||||||
*/
|
*/
|
||||||
protected $ajaxEnv = [];
|
protected $ajaxEnv = [];
|
||||||
|
|
||||||
/**
|
|
||||||
* @var \TYPO3\CMS\Extbase\Service\ExtensionService
|
|
||||||
*/
|
|
||||||
protected $extensionService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* uribuilder
|
* uribuilder
|
||||||
@ -139,17 +135,14 @@ class ActionController extends BaseController
|
|||||||
protected $config = [];
|
protected $config = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* propertyMappginConfigrtationBuolder
|
* ExtensionService
|
||||||
|
*
|
||||||
|
* @var ExtensionService
|
||||||
*/
|
*/
|
||||||
protected $propertyMapperConfigurationBuilder;
|
protected $extensionService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* translation extensions
|
* @param
|
||||||
*/
|
|
||||||
protected $translations = [];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \TYPO3\CMS\Extbase\Service\ExtensionService $extensionService
|
|
||||||
*/
|
*/
|
||||||
public function injectExtensionService(ExtensionService $extensionService)
|
public function injectExtensionService(ExtensionService $extensionService)
|
||||||
{
|
{
|
||||||
@ -172,6 +165,23 @@ class ActionController extends BaseController
|
|||||||
$this->environmentService = $environmentService;
|
$this->environmentService = $environmentService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * propertyMapper
|
||||||
|
// *
|
||||||
|
// * @var PropertyMapper
|
||||||
|
// */
|
||||||
|
// protected $propertyMapper;
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @param
|
||||||
|
// */
|
||||||
|
// public function injectPropertyMapper(
|
||||||
|
// PropertyMapper $propertyMapper
|
||||||
|
// ):void {
|
||||||
|
// // \TYPO3\CMS\Core\Utility\DebugUtility::debug($propertyMapper);die;
|
||||||
|
// $this->propertyMapper = $propertyMapper;
|
||||||
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* propertyMappingConfigurationBuilder
|
* propertyMappingConfigurationBuilder
|
||||||
*
|
*
|
||||||
@ -212,6 +222,7 @@ class ActionController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function initializeAction()
|
public function initializeAction()
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($GLOBALS['TSFE']->config['config']) {
|
if ($GLOBALS['TSFE']->config['config']) {
|
||||||
$this->config = GeneralUtility::removeDotsFromTS(
|
$this->config = GeneralUtility::removeDotsFromTS(
|
||||||
$GLOBALS['TSFE']->config['config']
|
$GLOBALS['TSFE']->config['config']
|
||||||
@ -228,13 +239,13 @@ class ActionController extends BaseController
|
|||||||
}
|
}
|
||||||
$this->contentObjectUid =
|
$this->contentObjectUid =
|
||||||
$this->configurationManager->getContentObject()->data['uid'];
|
$this->configurationManager->getContentObject()->data['uid'];
|
||||||
$this->cacheManager = $this->objectManager->get(
|
$this->cacheManager = GeneralUtility::makeInstance(
|
||||||
CacheManager::class
|
CacheManager::class
|
||||||
);
|
);
|
||||||
//$this->cache = $this->cacheManager->getCache(
|
//$this->cache = $this->cacheManager->getCache(
|
||||||
// 'tobereplaced' //TODO: Replaceme
|
// 'tobereplaced' //TODO: Replaceme
|
||||||
//);
|
//);
|
||||||
$this->logManager = $this->objectManager->get(
|
$this->logManager = GeneralUtility::makeInstance(
|
||||||
LogManager::Class
|
LogManager::Class
|
||||||
);
|
);
|
||||||
$this->importLogger = $this->logManager->getLogger(
|
$this->importLogger = $this->logManager->getLogger(
|
||||||
@ -243,7 +254,7 @@ class ActionController extends BaseController
|
|||||||
$this->generalLogger = $this->logManager->getLogger(
|
$this->generalLogger = $this->logManager->getLogger(
|
||||||
__CLASS__
|
__CLASS__
|
||||||
);
|
);
|
||||||
$this->dataMapper = $this->objectManager->get(
|
$this->dataMapper = GeneralUtility::makeInstance(
|
||||||
DataMapper::Class
|
DataMapper::Class
|
||||||
);
|
);
|
||||||
$this->arguments->addNewArgument('step', 'string', false, false);
|
$this->arguments->addNewArgument('step', 'string', false, false);
|
||||||
@ -255,7 +266,7 @@ class ActionController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function getUriBuilder()
|
public function getUriBuilder()
|
||||||
{
|
{
|
||||||
return $this->objectManager->get(
|
return GeneralUtility::makeInstance(
|
||||||
UriBuilder::class
|
UriBuilder::class
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -265,7 +276,7 @@ class ActionController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function persistAll()
|
public function persistAll()
|
||||||
{
|
{
|
||||||
($this->objectManager->get(
|
(GeneralUtility::makeInstance(
|
||||||
PersistenceManager::class
|
PersistenceManager::class
|
||||||
))->persistAll();
|
))->persistAll();
|
||||||
}
|
}
|
||||||
@ -441,21 +452,7 @@ class ActionController extends BaseController
|
|||||||
$schema
|
$schema
|
||||||
);
|
);
|
||||||
if (!$validationResult->isValid()) {
|
if (!$validationResult->isValid()) {
|
||||||
//foreach ($validationResult->getErrors() as $error){
|
|
||||||
// $field = implode('.', $error->dataPointer());
|
|
||||||
// if ($error->keyword() == 'required') {
|
|
||||||
// $tmp = $error->dataPointer();
|
|
||||||
// array_push($tmp, $error->keywordArgs()['missing']);
|
|
||||||
// $field = implode('.', $tmp);
|
|
||||||
// }
|
|
||||||
// if ($error->keyword() == 'additionalProperties') {
|
|
||||||
// continue;
|
|
||||||
// }
|
|
||||||
// $this->errors[$field] = [
|
|
||||||
// 'keyword' => $error->keyword(),
|
|
||||||
// 'details' => $error->keywordArgs()
|
|
||||||
// ];
|
|
||||||
//}
|
|
||||||
if ($translate) {
|
if ($translate) {
|
||||||
$this->translateErrorMessages($validationResult);
|
$this->translateErrorMessages($validationResult);
|
||||||
}
|
}
|
||||||
@ -586,7 +583,7 @@ class ActionController extends BaseController
|
|||||||
if (in_array($argument->getName(), ['step', 'submit', $object])) {
|
if (in_array($argument->getName(), ['step', 'submit', $object])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (is_string($argument->getValue()) && method_exists($argument->getValue(), 'getUid')) {
|
if (method_exists($argument->getValue(), 'getUid')) {
|
||||||
$pluginArguments[$argument->getName()]
|
$pluginArguments[$argument->getName()]
|
||||||
= $argument->getValue()->getUid();
|
= $argument->getValue()->getUid();
|
||||||
} else {
|
} else {
|
||||||
@ -607,24 +604,8 @@ class ActionController extends BaseController
|
|||||||
$this->request->getControllerActionName(),
|
$this->request->getControllerActionName(),
|
||||||
$pluginArguments
|
$pluginArguments
|
||||||
);
|
);
|
||||||
$uriTranslation = $this->getControllerContext()
|
|
||||||
->getUriBuilder()
|
|
||||||
->reset()
|
|
||||||
->setCreateAbsoluteUri(true)
|
|
||||||
->setAddQueryString(true)
|
|
||||||
->setTargetPageType(6001)
|
|
||||||
->uriFor(
|
|
||||||
'translations',
|
|
||||||
[
|
|
||||||
'extensions' => $this->translations,
|
|
||||||
],
|
|
||||||
'Translation',
|
|
||||||
'TemplatesAide',
|
|
||||||
'Translationplugin'
|
|
||||||
);
|
|
||||||
$this->ajaxEnv = [
|
$this->ajaxEnv = [
|
||||||
'uri' => $uri,
|
'uri' => $uri,
|
||||||
'uriTranslation' => $uriTranslation,
|
|
||||||
'object' => $object,
|
'object' => $object,
|
||||||
'namespace' => $this->getPluginNamespace(),
|
'namespace' => $this->getPluginNamespace(),
|
||||||
];
|
];
|
||||||
@ -672,6 +653,7 @@ class ActionController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function initializePropertyMappingConfigurationFromRequest(\TYPO3\CMS\Extbase\Mvc\Request $request, $propertyMappingConfiguration, $propertyNameTest)
|
public function initializePropertyMappingConfigurationFromRequest(\TYPO3\CMS\Extbase\Mvc\Request $request, $propertyMappingConfiguration, $propertyNameTest)
|
||||||
{
|
{
|
||||||
|
|
||||||
$trustedPropertiesToken = $request->getInternalArgument('__trustedProperties');
|
$trustedPropertiesToken = $request->getInternalArgument('__trustedProperties');
|
||||||
if (!is_string($trustedPropertiesToken)) {
|
if (!is_string($trustedPropertiesToken)) {
|
||||||
return;
|
return;
|
||||||
@ -684,14 +666,10 @@ class ActionController extends BaseController
|
|||||||
}
|
}
|
||||||
$trustedProperties = unserialize($serializedTrustedProperties, ['allowed_classes' => false]);
|
$trustedProperties = unserialize($serializedTrustedProperties, ['allowed_classes' => false]);
|
||||||
foreach ($trustedProperties as $propertyName => $propertyConfiguration) {
|
foreach ($trustedProperties as $propertyName => $propertyConfiguration) {
|
||||||
|
|
||||||
//if (!$controllerArguments->hasArgument($propertyName)) {
|
|
||||||
// continue;
|
|
||||||
//}
|
|
||||||
if ($propertyName != $propertyNameTest) {
|
if ($propertyName != $propertyNameTest) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//$propertyMappingConfiguration = $controllerArguments->getArgument($propertyName)->getPropertyMappingConfiguration();
|
|
||||||
$this->modifyPropertyMappingConfiguration($propertyConfiguration, $propertyMappingConfiguration);
|
$this->modifyPropertyMappingConfiguration($propertyConfiguration, $propertyMappingConfiguration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -738,6 +716,7 @@ class ActionController extends BaseController
|
|||||||
$errorStatus = null,
|
$errorStatus = null,
|
||||||
$object = 'data'
|
$object = 'data'
|
||||||
) {
|
) {
|
||||||
|
|
||||||
$this->setAjaxEnv($object);
|
$this->setAjaxEnv($object);
|
||||||
if ($result == null) {
|
if ($result == null) {
|
||||||
$result = [];
|
$result = [];
|
||||||
@ -747,6 +726,7 @@ class ActionController extends BaseController
|
|||||||
$result,
|
$result,
|
||||||
['errors' => $this->errors]
|
['errors' => $this->errors]
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
if (!empty($this->errorLabels)) {
|
if (!empty($this->errorLabels)) {
|
||||||
$result = array_merge(
|
$result = array_merge(
|
||||||
@ -761,38 +741,23 @@ class ActionController extends BaseController
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
if ($this->pageType) {
|
if ($this->pageType) {
|
||||||
|
$requestFactory = GeneralUtility::makeInstance(RequestFactory::class);
|
||||||
if (is_array($this->responseStatus)) {
|
if (is_array($this->responseStatus)) {
|
||||||
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
// $this->response->setStatus(
|
||||||
$response = $this
|
// array_key_first($this->responseStatus)
|
||||||
->responseFactory
|
// );
|
||||||
|
$response = $this->responseFactory
|
||||||
->createResponse()
|
->createResponse()
|
||||||
->withHeader(
|
->withHeader('Content-Type', 'application/json; charset=utf-8')
|
||||||
'Content-Type',
|
->withStatus(array_key_first($this->responseStatus), '');
|
||||||
'application/json; charset=utf-8'
|
|
||||||
)
|
|
||||||
->withStatus(
|
|
||||||
array_key_first($this->responseStatus),
|
|
||||||
''
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
$this->response->setStatus(
|
//$this->response->setStatus($this->responseStatus);
|
||||||
array_key_first($this->responseStatus)
|
$response = $this->responseFactory
|
||||||
);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
|
||||||
$response = $this
|
|
||||||
->responseFactory
|
|
||||||
->createResponse()
|
->createResponse()
|
||||||
->withHeader(
|
->withHeader('Content-Type', 'application/json; charset=utf-8')
|
||||||
'Content-Type',
|
|
||||||
'application/json; charset=utf-8'
|
|
||||||
)
|
|
||||||
->withStatus($this->responseStatus, '');
|
->withStatus($this->responseStatus, '');
|
||||||
} else {
|
|
||||||
$this->response->setStatus($this->responseStatus);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->pageType == $this->ajaxPageType) {
|
if ($this->pageType == $this->ajaxPageType) {
|
||||||
if ($this->environmentService->isEnvironmentInBackendMode()) {
|
if ($this->environmentService->isEnvironmentInBackendMode()) {
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
@ -807,12 +772,13 @@ class ActionController extends BaseController
|
|||||||
if ($this->reload) {
|
if ($this->reload) {
|
||||||
$result['reload'] = true;
|
$result['reload'] = true;
|
||||||
}
|
}
|
||||||
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
|
||||||
|
//\TYPO3\CMS\Core\Utility\DebugUtility::debug($result);die;
|
||||||
|
//return json_encode($result);
|
||||||
|
|
||||||
|
|
||||||
$response->getBody()->write(json_encode($result));
|
$response->getBody()->write(json_encode($result));
|
||||||
return $response;
|
return $response;
|
||||||
} else {
|
|
||||||
return json_encode($result);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$result = array_merge(
|
$result = array_merge(
|
||||||
$result,
|
$result,
|
||||||
@ -826,54 +792,13 @@ class ActionController extends BaseController
|
|||||||
['ajaxEnv' => $this->ajaxEnv]
|
['ajaxEnv' => $this->ajaxEnv]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$this->view->assignMultiple($result);
|
$this->view->assignMultiple($result);
|
||||||
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
return $this->responseFactory
|
||||||
return $this
|
|
||||||
->responseFactory
|
|
||||||
->createResponse()
|
->createResponse()
|
||||||
->withHeader('Content-Type', 'text/html; charset=utf-8')
|
->withHeader('Content-Type', 'text/html; charset=utf-8')
|
||||||
->withBody($this->streamFactory->createStream(
|
->withStatus(200, 'Super ok!')
|
||||||
(string)($html ?? $this->view->render()))
|
->withBody($this->streamFactory->createStream($this->view->render()));
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/** **/
|
|
||||||
protected function valideCaptcha($captchaId, $value
|
|
||||||
) {
|
|
||||||
$captchaPhrases = $this->getFeUser()->getKey('ses', 'captchaPhrases');
|
|
||||||
if (!$captchaPhrases || !is_array($captchaPhrases) || !is_string($value)) {
|
|
||||||
$this->addValidationError(
|
|
||||||
'captcha',
|
|
||||||
'validator.notvalid'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
// get captcha secret from cache and compare
|
|
||||||
$time = time();
|
|
||||||
$captchaPhrases = array_filter(
|
|
||||||
$captchaPhrases,
|
|
||||||
function ($captchaLifetime) use ($time) {
|
|
||||||
return $captchaLifetime > $time;
|
|
||||||
},
|
|
||||||
ARRAY_FILTER_USE_KEY
|
|
||||||
);
|
|
||||||
foreach ($captchaPhrases as $lifetime => $captchaPhrase) {
|
|
||||||
$isValid = !empty($captchaPhrase) && $captchaPhrase === $value;
|
|
||||||
if ($isValid) {
|
|
||||||
// remove solved captcha
|
|
||||||
unset($captchaPhrases[$lifetime]);
|
|
||||||
$this->getFeUser()->setKey('ses', 'captchaPhrases', $captchaPhrases);
|
|
||||||
$this->getFeUser()->storeSessionData();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$this->addValidationError(
|
|
||||||
'captcha',
|
|
||||||
'validator.notvalid'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getFeUser(): FrontendUserAuthentication
|
|
||||||
{
|
|
||||||
return $GLOBALS['TSFE']->fe_user;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,9 +45,6 @@ class EIDController extends AbstractEIDController
|
|||||||
ResponseInterface $response = null
|
ResponseInterface $response = null
|
||||||
) {
|
) {
|
||||||
$GLOBALS['TSFE']->fe_user->setKey('ses', 'scriptstate', 0);
|
$GLOBALS['TSFE']->fe_user->setKey('ses', 'scriptstate', 0);
|
||||||
//\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump(
|
|
||||||
// $GLOBALS['TSFE']->fe_user->getKey('ses', 'scriptstate')
|
|
||||||
//);
|
|
||||||
$GLOBALS["TSFE"]->storeSessionData();
|
$GLOBALS["TSFE"]->storeSessionData();
|
||||||
$response->getBody()->write(\json_encode([]));
|
$response->getBody()->write(\json_encode([]));
|
||||||
return $response;
|
return $response;
|
||||||
|
@ -1,66 +0,0 @@
|
|||||||
<?php
|
|
||||||
namespace Cjel\TemplatesAide\Controller;
|
|
||||||
|
|
||||||
/***
|
|
||||||
*
|
|
||||||
* This file is part of the "Templates Aide" Extension for TYPO3 CMS.
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please read the
|
|
||||||
* LICENSE.txt file that was distributed with this source code.
|
|
||||||
*
|
|
||||||
* (c) 2024 Philipp Dieter <philippdieter@attic-media.net>
|
|
||||||
*
|
|
||||||
***/
|
|
||||||
|
|
||||||
use TYPO3\CMS\Core\Localization\LocalizationFactory;
|
|
||||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* TranslationController
|
|
||||||
*/
|
|
||||||
class TranslationController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
|
|
||||||
{
|
|
||||||
|
|
||||||
protected static $locallangPath = 'Resources/Private/Language/';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* action translations
|
|
||||||
*
|
|
||||||
* @param array $extensions
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function translationsAction($extensions = [])
|
|
||||||
{
|
|
||||||
$result = [];
|
|
||||||
foreach ($extensions as $extension) {
|
|
||||||
$langfilePath = 'EXT:'
|
|
||||||
. GeneralUtility::camelCaseToLowerCaseUnderscored($extension)
|
|
||||||
. '/'
|
|
||||||
. self::$locallangPath
|
|
||||||
. 'locallang.xlf';
|
|
||||||
$languageFactory = GeneralUtility::makeInstance(
|
|
||||||
LocalizationFactory::class
|
|
||||||
);
|
|
||||||
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
|
||||||
$language = $this->request->getAttribute('language');
|
|
||||||
} else {
|
|
||||||
$language = $GLOBALS['TYPO3_REQUEST']->getAttribute('language');
|
|
||||||
}
|
|
||||||
$locale = $language->getLocale();
|
|
||||||
//\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump(
|
|
||||||
// $locale, '$locale', 3, true, false
|
|
||||||
//);
|
|
||||||
$langfileContent = $languageFactory->getParsedData(
|
|
||||||
$langfilePath,
|
|
||||||
$locale
|
|
||||||
);
|
|
||||||
$langfileResult = [];
|
|
||||||
foreach (reset($langfileContent) as $key => $row) {
|
|
||||||
$langfileResult[$key] = reset($row)['target'];
|
|
||||||
}
|
|
||||||
$result[$extension] = $langfileResult;
|
|
||||||
}
|
|
||||||
$GLOBALS['TSFE']->setContentType('application/json');
|
|
||||||
return json_encode($result);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,20 +0,0 @@
|
|||||||
<?php
|
|
||||||
namespace Cjel\TemplatesAide\Domain\Model;
|
|
||||||
|
|
||||||
|
|
||||||
/***
|
|
||||||
*
|
|
||||||
* This file is part of the "Templates Aide" Extension for TYPO3 CMS.
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please read the
|
|
||||||
* LICENSE.txt file that was distributed with this source code.
|
|
||||||
*
|
|
||||||
* (c) 2024 Philipp Dieter <philippdieter@attic-media.net>
|
|
||||||
*
|
|
||||||
***/
|
|
||||||
/**
|
|
||||||
* Translation
|
|
||||||
*/
|
|
||||||
class Translation extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
|
||||||
{
|
|
||||||
}
|
|
@ -11,17 +11,7 @@ namespace Cjel\TemplatesAide\Hooks;
|
|||||||
* (c) 2018 Philipp Dieter <philippdieter@attic-media.net>
|
* (c) 2018 Philipp Dieter <philippdieter@attic-media.net>
|
||||||
*
|
*
|
||||||
***/
|
***/
|
||||||
|
|
||||||
//use GridElementsTeam\Gridelements\Backend\LayoutSetup;
|
|
||||||
//use TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController;
|
|
||||||
//use TYPO3\CMS\Backend\Utility\BackendUtility;
|
|
||||||
use TYPO3\CMS\Backend\Wizard\NewContentElementWizardHookInterface;
|
use TYPO3\CMS\Backend\Wizard\NewContentElementWizardHookInterface;
|
||||||
//use TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider;
|
|
||||||
//use TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider;
|
|
||||||
//use TYPO3\CMS\Core\Imaging\IconRegistry;
|
|
||||||
//use TYPO3\CMS\Core\Utility\GeneralUtility;
|
|
||||||
//use TYPO3\CMS\Core\Utility\StringUtility;
|
|
||||||
//use TYPO3\CMS\Lang\LanguageService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class/Function which manipulates the rendering of items within the new content element wizard
|
* Class/Function which manipulates the rendering of items within the new content element wizard
|
||||||
|
@ -75,14 +75,6 @@ class Double2Converter extends AbstractTypeConverter
|
|||||||
$value *= -1;
|
$value *= -1;
|
||||||
}
|
}
|
||||||
$value = number_format($value, 2, '.', '');
|
$value = number_format($value, 2, '.', '');
|
||||||
//\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump(
|
|
||||||
// $source, null, 3
|
|
||||||
//);
|
|
||||||
//if (is_string($source)) {
|
|
||||||
// if ($source === '') {
|
|
||||||
// $source = [];
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -80,10 +80,10 @@ trait DependencyInjectionTrait
|
|||||||
$this->objectManager = GeneralUtility::makeInstance(
|
$this->objectManager = GeneralUtility::makeInstance(
|
||||||
ObjectManager::class
|
ObjectManager::class
|
||||||
);
|
);
|
||||||
$this->configurationManager = $this->objectManager->get(
|
$this->configurationManager = GeneralUtility::makeInstance(
|
||||||
ConfigurationManagerInterface::class
|
ConfigurationManagerInterface::class
|
||||||
);
|
);
|
||||||
$this->apiUtility = $this->objectManager->get(
|
$this->apiUtility = GeneralUtility::makeInstance(
|
||||||
ApiUtility::class
|
ApiUtility::class
|
||||||
);
|
);
|
||||||
$frameworkConfiguration = $this->configurationManager->getConfiguration(
|
$frameworkConfiguration = $this->configurationManager->getConfiguration(
|
||||||
@ -102,17 +102,7 @@ trait DependencyInjectionTrait
|
|||||||
$frameworkConfiguration['persistence']['storagePid']
|
$frameworkConfiguration['persistence']['storagePid']
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
$this->reflectionService = GeneralUtility::makeInstance(ReflectionService::class);
|
||||||
$this->reflectionService = GeneralUtility::makeInstance(
|
|
||||||
ReflectionService::class
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
$this->reflectionService = GeneralUtility::makeInstance(
|
|
||||||
ReflectionService::class, GeneralUtility::makeInstance(
|
|
||||||
CacheManager::class
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
$classInfo = $this->reflectionService->getClassSchema(
|
$classInfo = $this->reflectionService->getClassSchema(
|
||||||
get_class($this)
|
get_class($this)
|
||||||
);
|
);
|
||||||
|
@ -127,22 +127,12 @@ trait ValidationTrait
|
|||||||
if (is_array($input) && array_key_exists('eID', $input)) {
|
if (is_array($input) && array_key_exists('eID', $input)) {
|
||||||
unset($input['eID']);
|
unset($input['eID']);
|
||||||
}
|
}
|
||||||
//@TODO make optional when usiing rest api
|
|
||||||
//array_walk_recursive(
|
|
||||||
// $input,
|
|
||||||
// function (&$value) {
|
|
||||||
// if (filter_var($value, FILTER_VALIDATE_INT)) {
|
|
||||||
// $value = (int)$value;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//);
|
|
||||||
$input = ArrayUtility::toObject($input);
|
$input = ArrayUtility::toObject($input);
|
||||||
$validationResult = $validator->dataValidation(
|
$validationResult = $validator->dataValidation(
|
||||||
$input,
|
$input,
|
||||||
json_encode($schema),
|
json_encode($schema),
|
||||||
-1
|
-1
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!$validationResult->isValid()) {
|
if (!$validationResult->isValid()) {
|
||||||
$this->isValid = false;
|
$this->isValid = false;
|
||||||
$this->responseStatus = [400 => 'validationError'];
|
$this->responseStatus = [400 => 'validationError'];
|
||||||
|
@ -12,12 +12,10 @@ namespace Cjel\TemplatesAide\Utility;
|
|||||||
*
|
*
|
||||||
***/
|
***/
|
||||||
|
|
||||||
use TYPO3\CMS\Core\Resource\Exception\FolderDoesNotExistException;
|
|
||||||
use TYPO3\CMS\Core\Resource\FileReference as CoreFileReference;
|
use TYPO3\CMS\Core\Resource\FileReference as CoreFileReference;
|
||||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
|
||||||
use TYPO3\CMS\Extbase\Domain\Model\FileReference as ExtbaseFileReference;
|
use TYPO3\CMS\Extbase\Domain\Model\FileReference as ExtbaseFileReference;
|
||||||
|
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||||
use TYPO3\CMS\Extbase\Object\ObjectManager;
|
use TYPO3\CMS\Extbase\Object\ObjectManager;
|
||||||
use TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy;
|
|
||||||
use TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage;
|
use TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage;
|
||||||
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
|
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
|
||||||
use TYPO3\CMS\Extbase\Service\ImageService;
|
use TYPO3\CMS\Extbase\Service\ImageService;
|
||||||
@ -49,7 +47,7 @@ class ApiUtility
|
|||||||
$this->objectManager = GeneralUtility::makeInstance(
|
$this->objectManager = GeneralUtility::makeInstance(
|
||||||
ObjectManager::class
|
ObjectManager::class
|
||||||
);
|
);
|
||||||
$this->imageService = $this->objectManager->get(
|
$this->imageService = GeneralUtility::makeInstance(
|
||||||
imageService::class
|
imageService::class
|
||||||
);
|
);
|
||||||
if (1 == 0) {
|
if (1 == 0) {
|
||||||
@ -77,11 +75,6 @@ class ApiUtility
|
|||||||
if (substr($method, 0, 3) === 'get') {
|
if (substr($method, 0, 3) === 'get') {
|
||||||
$methodResult = call_user_func([$row, $method]);
|
$methodResult = call_user_func([$row, $method]);
|
||||||
$attributeName = lcfirst(substr($method, 3));
|
$attributeName = lcfirst(substr($method, 3));
|
||||||
if (is_object($methodResult)
|
|
||||||
&& get_class($methodResult) == LazyLoadingProxy::class
|
|
||||||
) {
|
|
||||||
$methodResult = $methodResult->_loadRealInstance();
|
|
||||||
}
|
|
||||||
$propertieResults[$attributeName] = $methodResult;
|
$propertieResults[$attributeName] = $methodResult;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -178,6 +171,12 @@ class ApiUtility
|
|||||||
) {
|
) {
|
||||||
$rowResult[$attributeName] = [];
|
$rowResult[$attributeName] = [];
|
||||||
foreach ($methodResult as $object) {
|
foreach ($methodResult as $object) {
|
||||||
|
if (!method_exists(
|
||||||
|
$methodResult,
|
||||||
|
'getOriginalResource'
|
||||||
|
)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$rowResult[$attributeName]
|
$rowResult[$attributeName]
|
||||||
= $this->filereferenceToApi(
|
= $this->filereferenceToApi(
|
||||||
$methodResult->getOriginalResource()
|
$methodResult->getOriginalResource()
|
||||||
@ -227,7 +226,7 @@ class ApiUtility
|
|||||||
$this->objectManager = GeneralUtility::makeInstance(
|
$this->objectManager = GeneralUtility::makeInstance(
|
||||||
ObjectManager::class
|
ObjectManager::class
|
||||||
);
|
);
|
||||||
$this->imageService = $this->objectManager->get(
|
$this->imageService = GeneralUtility::makeInstance(
|
||||||
imageService::class
|
imageService::class
|
||||||
);
|
);
|
||||||
$httpHost = GeneralUtility::getIndpEnv('HTTP_HOST');
|
$httpHost = GeneralUtility::getIndpEnv('HTTP_HOST');
|
||||||
@ -236,23 +235,14 @@ class ApiUtility
|
|||||||
$absoluteUrl = $requestHost
|
$absoluteUrl = $requestHost
|
||||||
. '/'
|
. '/'
|
||||||
. $publicUrl;
|
. $publicUrl;
|
||||||
try {
|
|
||||||
$imagePreview = $this->imageService->getImage(
|
$imagePreview = $this->imageService->getImage(
|
||||||
$publicUrl,
|
$publicUrl,
|
||||||
null,
|
null,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
} catch (FolderDoesNotExistException $e) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
$processingInstructionsPreview = array(
|
$processingInstructionsPreview = array(
|
||||||
//'width' => '1024c',
|
|
||||||
//'height' => '768c',
|
|
||||||
//'minWidth' => $minWidth,
|
|
||||||
//'minHeight' => $minHeight,
|
|
||||||
'maxWidth' => '1024',
|
'maxWidth' => '1024',
|
||||||
'maxHeight' => '768',
|
'maxHeight' => '768',
|
||||||
//'crop' => $crop,
|
|
||||||
);
|
);
|
||||||
$processedImagePreview = $this->imageService
|
$processedImagePreview = $this->imageService
|
||||||
->applyProcessingInstructions(
|
->applyProcessingInstructions(
|
||||||
|
@ -67,20 +67,4 @@ class ArrayUtility
|
|||||||
return array_keys($arr) !== range(0, count($arr) - 1);
|
return array_keys($arr) !== range(0, count($arr) - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the depth of an array
|
|
||||||
*/
|
|
||||||
function depth(array $array) {
|
|
||||||
$depthMax = 1;
|
|
||||||
foreach ($array as $value) {
|
|
||||||
if (is_array($value)) {
|
|
||||||
$depth = self::depth($value) + 1;
|
|
||||||
if ($depth > $depthMax) {
|
|
||||||
$depthMax = $depth;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $depthMax;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ use TYPO3\CMS\Fluid\View\StandaloneView;
|
|||||||
use TYPO3\CMS\Fluid\View\TemplatePaths;
|
use TYPO3\CMS\Fluid\View\TemplatePaths;
|
||||||
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
||||||
use Symfony\Component\Mime\Address;
|
use Symfony\Component\Mime\Address;
|
||||||
use TYPO3\CMS\Frontend\Page\PageRepository;
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -80,10 +80,6 @@ class MailUtility
|
|||||||
$type = 'tableLayout';
|
$type = 'tableLayout';
|
||||||
$textPart = substr($textPart, 3);
|
$textPart = substr($textPart, 3);
|
||||||
}
|
}
|
||||||
if (substr($textPart, 0, 3) === '---') {
|
|
||||||
$type = 'divider';
|
|
||||||
$textPart = substr($textPart, 3);
|
|
||||||
}
|
|
||||||
if (substr($textPart, 0, 9) === '%subject ') {
|
if (substr($textPart, 0, 9) === '%subject ') {
|
||||||
$type = 'subject';
|
$type = 'subject';
|
||||||
$textPart = substr($textPart, 9);
|
$textPart = substr($textPart, 9);
|
||||||
@ -181,7 +177,7 @@ class MailUtility
|
|||||||
$templateNameText = 'Mails/DefaultText';
|
$templateNameText = 'Mails/DefaultText';
|
||||||
}
|
}
|
||||||
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
|
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
|
||||||
$configurationManager = $objectManager->get(
|
$configurationManager = GeneralUtility::makeInstance(
|
||||||
ConfigurationManagerInterface::class
|
ConfigurationManagerInterface::class
|
||||||
);
|
);
|
||||||
$typoScript = $configurationManager->getConfiguration(
|
$typoScript = $configurationManager->getConfiguration(
|
||||||
@ -190,9 +186,9 @@ class MailUtility
|
|||||||
$settings =
|
$settings =
|
||||||
(array)$typoScript['module.']['tx_templatesaide.']['settings.'];
|
(array)$typoScript['module.']['tx_templatesaide.']['settings.'];
|
||||||
$settings = GeneralUtility::removeDotsFromTS($settings);
|
$settings = GeneralUtility::removeDotsFromTS($settings);
|
||||||
$htmlView = $objectManager->get(StandaloneView::class);
|
$htmlView = GeneralUtility::makeInstance(StandaloneView::class);
|
||||||
$htmlView->setTemplate($templateNameHtml);
|
$htmlView->setTemplate($templateNameHtml);
|
||||||
$textView = $objectManager->get(StandaloneView::class);
|
$textView = GeneralUtility::makeInstance(StandaloneView::class);
|
||||||
if ($templatePaths) {
|
if ($templatePaths) {
|
||||||
$partialRootPaths = $htmlView->getPartialRootPaths();
|
$partialRootPaths = $htmlView->getPartialRootPaths();
|
||||||
$partialRootPaths[] = GeneralUtility::getFileAbsFileName(
|
$partialRootPaths[] = GeneralUtility::getFileAbsFileName(
|
||||||
@ -221,11 +217,15 @@ class MailUtility
|
|||||||
$textView->setTemplate($templateNameText);
|
$textView->setTemplate($templateNameText);
|
||||||
$mail = GeneralUtility::makeInstance(MailMessage::class);
|
$mail = GeneralUtility::makeInstance(MailMessage::class);
|
||||||
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
||||||
$mail->from(new Address(key($sender),$sender[key($sender)]));
|
|
||||||
$mail->subject($subject);
|
$mail->subject($subject);
|
||||||
|
if ($sender) {
|
||||||
|
$mail->from($sender);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$mail->setFrom($sender);
|
|
||||||
$mail->setSubject($subject);
|
$mail->setSubject($subject);
|
||||||
|
if ($sender) {
|
||||||
|
$mail->setFrom($sender);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$bodydataText = [];
|
$bodydataText = [];
|
||||||
$bodydataHtml = [];
|
$bodydataHtml = [];
|
||||||
@ -233,7 +233,6 @@ class MailUtility
|
|||||||
switch($row['type']) {
|
switch($row['type']) {
|
||||||
case 'text':
|
case 'text':
|
||||||
case 'table':
|
case 'table':
|
||||||
case 'tablelr':
|
|
||||||
case 'tableLayout':
|
case 'tableLayout':
|
||||||
case 'list':
|
case 'list':
|
||||||
case 'textbold':
|
case 'textbold':
|
||||||
@ -244,8 +243,6 @@ class MailUtility
|
|||||||
case 'buttonleft':
|
case 'buttonleft':
|
||||||
case 'buttoncenter':
|
case 'buttoncenter':
|
||||||
case 'buttonright':
|
case 'buttonright':
|
||||||
case 'divider':
|
|
||||||
case 'hr':
|
|
||||||
$row['data'] = str_replace(
|
$row['data'] = str_replace(
|
||||||
"\\\n",
|
"\\\n",
|
||||||
'',
|
'',
|
||||||
@ -321,10 +318,6 @@ class MailUtility
|
|||||||
$bodydataText[] = $textRow;
|
$bodydataText[] = $textRow;
|
||||||
$bodydataHtml[] = $htmlRow;
|
$bodydataHtml[] = $htmlRow;
|
||||||
break;
|
break;
|
||||||
case 'contentBlockHtml':
|
|
||||||
$htmlRow = $row;
|
|
||||||
$bodydataHtml[] = $htmlRow;
|
|
||||||
break;
|
|
||||||
case 'attachment':
|
case 'attachment':
|
||||||
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
||||||
$mail->attach(
|
$mail->attach(
|
||||||
@ -368,17 +361,7 @@ class MailUtility
|
|||||||
if ($assetDomain) {
|
if ($assetDomain) {
|
||||||
$domain = $assetDomain;
|
$domain = $assetDomain;
|
||||||
}
|
}
|
||||||
$dataProtectionPid = $settings['dataProtectionPid'];
|
|
||||||
$uriBuilder = $objectManager->get(
|
|
||||||
UriBuilder::class
|
|
||||||
);
|
|
||||||
if ($dataProtectionPid) {
|
|
||||||
$pageRepository = GeneralUtility::makeInstance(PageRepository::class);
|
|
||||||
$urlPage = $pageRepository->getPage($settings['dataProtectionPid']);
|
|
||||||
$dataProtectionPid = $domain.$urlPage['slug'];
|
|
||||||
}
|
|
||||||
$htmlView->assign('domain', $domain);
|
$htmlView->assign('domain', $domain);
|
||||||
$htmlView->assign('linkDataprotection', $dataProtectionPid);
|
|
||||||
$textBody = $textView->render();
|
$textBody = $textView->render();
|
||||||
$htmlBody = $htmlView->render();
|
$htmlBody = $htmlView->render();
|
||||||
if ($domain) {
|
if ($domain) {
|
||||||
@ -412,6 +395,7 @@ class MailUtility
|
|||||||
);
|
);
|
||||||
foreach ($recipientsIntercecpted as $recipientIntercepted) {
|
foreach ($recipientsIntercecpted as $recipientIntercepted) {
|
||||||
foreach ($recipients as $recipient) {
|
foreach ($recipients as $recipient) {
|
||||||
|
|
||||||
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
||||||
$mail->subject(
|
$mail->subject(
|
||||||
$subjectOrig . ' [ORIG-TO: ' . trim($recipient) . ']'
|
$subjectOrig . ' [ORIG-TO: ' . trim($recipient) . ']'
|
||||||
@ -423,6 +407,7 @@ class MailUtility
|
|||||||
);
|
);
|
||||||
$mail->setTo(trim($recipientIntercepted));
|
$mail->setTo(trim($recipientIntercepted));
|
||||||
}
|
}
|
||||||
|
|
||||||
$mail->send();
|
$mail->send();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -433,27 +418,9 @@ class MailUtility
|
|||||||
}else {
|
}else {
|
||||||
$mail->setTo(trim($recipient));
|
$mail->setTo(trim($recipient));
|
||||||
}
|
}
|
||||||
|
|
||||||
$mail->send();
|
$mail->send();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Debug print
|
|
||||||
*/
|
|
||||||
public static function printMaildata($maildata)
|
|
||||||
{
|
|
||||||
foreach ($maildata as $row) {
|
|
||||||
if (!is_array($row['data'])) {
|
|
||||||
print($row['data']);
|
|
||||||
} else {
|
|
||||||
print($row['data'][0]);
|
|
||||||
print(PHP_EOL);
|
|
||||||
print($row['data'][1]);
|
|
||||||
}
|
|
||||||
print(PHP_EOL);
|
|
||||||
}
|
|
||||||
print(PHP_EOL);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
43
Classes/Utility/SessionUtility.php
Normal file
43
Classes/Utility/SessionUtility.php
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
namespace Cjel\TemplatesAide\Utility;
|
||||||
|
|
||||||
|
/***
|
||||||
|
*
|
||||||
|
* This file is part of the "Templates Aide" Extension for TYPO3 CMS.
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please read the
|
||||||
|
* LICENSE.txt file that was distributed with this source code.
|
||||||
|
*
|
||||||
|
* filey as part of the extension by 2024 Philipp Dieter <philipp.dieter@attic-media.net>
|
||||||
|
*
|
||||||
|
***/
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class SessionUtility
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function setSessionValue(
|
||||||
|
$type, $key, $value
|
||||||
|
) {
|
||||||
|
$request = $GLOBALS['TYPO3_REQUEST'];
|
||||||
|
$frontendUser = $request->getAttribute('frontend.user');
|
||||||
|
$frontendUser->setKey($type, $key, $value);
|
||||||
|
$frontendUser->storeSessionData();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static function getSessionValue(
|
||||||
|
$type, $key
|
||||||
|
) {
|
||||||
|
$request = $GLOBALS['TYPO3_REQUEST'];
|
||||||
|
$frontendUser = $request->getAttribute('frontend.user');
|
||||||
|
return $frontendUser->getKey($type, $key);
|
||||||
|
}
|
||||||
|
}
|
@ -45,7 +45,7 @@ class StringUtility
|
|||||||
return $string;
|
return $string;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getRandomString(
|
function getRandomString(
|
||||||
int $length = 64,
|
int $length = 64,
|
||||||
string $keyspace = null
|
string $keyspace = null
|
||||||
): string {
|
): string {
|
||||||
|
@ -29,6 +29,7 @@ class TcaUtility
|
|||||||
public static function configureSelect(
|
public static function configureSelect(
|
||||||
&$tca, $column, $element, $options, $extensionKey = null
|
&$tca, $column, $element, $options, $extensionKey = null
|
||||||
) {
|
) {
|
||||||
|
|
||||||
foreach ($options as &$option) {
|
foreach ($options as &$option) {
|
||||||
$translationKey = "option.$element.$column.$option[0]";
|
$translationKey = "option.$element.$column.$option[0]";
|
||||||
$translation = self::getTranslation(
|
$translation = self::getTranslation(
|
||||||
@ -142,26 +143,6 @@ class TcaUtility
|
|||||||
return implode(', ', $fieldlist);
|
return implode(', ', $fieldlist);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public static function listMoveFieldBeforeField(
|
|
||||||
$fieldlist, $field, $fieldBefore
|
|
||||||
) {
|
|
||||||
$fieldlist = GeneralUtility::trimExplode(
|
|
||||||
',',
|
|
||||||
$fieldlist
|
|
||||||
);
|
|
||||||
unset($fieldlist[(array_search($field, $fieldlist))]);
|
|
||||||
array_splice(
|
|
||||||
$fieldlist,
|
|
||||||
array_search($fieldBefore, $fieldlist),
|
|
||||||
0,
|
|
||||||
$field
|
|
||||||
);
|
|
||||||
return implode(', ', $fieldlist);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* remove element from fieldlist
|
* remove element from fieldlist
|
||||||
*
|
*
|
||||||
|
@ -60,10 +60,6 @@ class WordWrapViewHelper extends AbstractViewHelper
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$temp = '';
|
$temp = '';
|
||||||
//while (mb_strlen($line) > $limit) {
|
|
||||||
// $temp .= mb_substr($line, 0, $limit - 1);
|
|
||||||
// $line = mb_substr($line, $limit - 1);
|
|
||||||
//}
|
|
||||||
if (false === empty($temp)) {
|
if (false === empty($temp)) {
|
||||||
$output .= $temp . $glue . $line . $glue;
|
$output .= $temp . $glue . $line . $glue;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Cjel\TemplatesAide\ViewHelpers;
|
namespace Cjel\TemplatesAide\ViewHelpers;
|
||||||
|
|
||||||
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
|
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||||
|
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||||
|
|
||||||
class HeaderDataViewHelper extends AbstractViewHelper
|
class HeaderDataViewHelper extends AbstractViewHelper
|
||||||
@ -25,12 +26,7 @@ class HeaderDataViewHelper extends AbstractViewHelper
|
|||||||
}
|
}
|
||||||
switch ($type){
|
switch ($type){
|
||||||
case 'tracking':
|
case 'tracking':
|
||||||
//if(GeneralUtility::getApplicationContext()->isProduction()){
|
|
||||||
$GLOBALS['TSFE']->additionalHeaderData[] = $data;
|
$GLOBALS['TSFE']->additionalHeaderData[] = $data;
|
||||||
//} else {
|
|
||||||
// $GLOBALS['TSFE']->additionalHeaderData[]
|
|
||||||
// = '<meta name="placeholder" content="tracking" />';
|
|
||||||
//}
|
|
||||||
break;
|
break;
|
||||||
case 'title':
|
case 'title':
|
||||||
$GLOBALS['TSFE']->additionalHeaderData[]
|
$GLOBALS['TSFE']->additionalHeaderData[]
|
||||||
|
@ -60,14 +60,10 @@ class ImageAppendViewHelper extends AbstractTagBasedViewHelper
|
|||||||
{
|
{
|
||||||
foreach ($this->arguments['images'] as $image) {
|
foreach ($this->arguments['images'] as $image) {
|
||||||
$imagePath = $image->getForLocalProcessing(false);
|
$imagePath = $image->getForLocalProcessing(false);
|
||||||
//$image = $this->imageService->getImage('', $imageArgument, true);
|
|
||||||
//$image = $this->imageService->getImageUri($image);
|
|
||||||
|
|
||||||
$imageMagickFile = ImageMagickFile::fromFilePath($imagePath, 0);
|
$imageMagickFile = ImageMagickFile::fromFilePath($imagePath, 0);
|
||||||
|
// \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump(
|
||||||
\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump(
|
// $imageMagickFile, null, 3
|
||||||
$imageMagickFile, null, 3
|
// );
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,7 +4,8 @@ namespace Cjel\TemplatesAide\ViewHelpers;
|
|||||||
use TYPO3\CMS\Core\Database\Connection;
|
use TYPO3\CMS\Core\Database\Connection;
|
||||||
use TYPO3\CMS\Core\Database\ConnectionPool;
|
use TYPO3\CMS\Core\Database\ConnectionPool;
|
||||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||||
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
|
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||||
|
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||||
|
|
||||||
class ScriptswitchNoscriptViewHelper extends AbstractViewHelper {
|
class ScriptswitchNoscriptViewHelper extends AbstractViewHelper {
|
||||||
|
|
||||||
@ -21,10 +22,6 @@ class ScriptswitchNoscriptViewHelper extends AbstractViewHelper {
|
|||||||
public function render()
|
public function render()
|
||||||
{
|
{
|
||||||
|
|
||||||
//\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump(
|
|
||||||
// $GLOBALS['TSFE']->fe_user->getKey('ses', 'scriptstate')
|
|
||||||
//);
|
|
||||||
|
|
||||||
$scriptstate = $GLOBALS['TSFE']->fe_user->getKey('ses', 'scriptstate');
|
$scriptstate = $GLOBALS['TSFE']->fe_user->getKey('ses', 'scriptstate');
|
||||||
|
|
||||||
if ($scriptstate) {
|
if ($scriptstate) {
|
||||||
|
@ -46,7 +46,7 @@ class TranslationViewHelper extends AbstractViewHelper
|
|||||||
'array',
|
'array',
|
||||||
'The arguments',
|
'The arguments',
|
||||||
false,
|
false,
|
||||||
false
|
[]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,10 +63,12 @@ class TranslationViewHelper extends AbstractViewHelper
|
|||||||
\Closure $renderChildrenClosure,
|
\Closure $renderChildrenClosure,
|
||||||
RenderingContextInterface $renderingContext
|
RenderingContextInterface $renderingContext
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
||||||
$translation = LocalizationUtility::translate(
|
$translation = LocalizationUtility::translate(
|
||||||
$arguments['key'],
|
$arguments['key'],
|
||||||
$arguments['extensionKey'],
|
$arguments['extensionKey'],
|
||||||
(array) $arguments['arguments']
|
$arguments['arguments']
|
||||||
);
|
);
|
||||||
if ($translation) {
|
if ($translation) {
|
||||||
return $translation;
|
return $translation;
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
<T3DataStructure>
|
|
||||||
<sheets>
|
|
||||||
<sDEF>
|
|
||||||
<ROOT>
|
|
||||||
<TCEforms>
|
|
||||||
<sheetTitle>Function</sheetTitle>
|
|
||||||
</TCEforms>
|
|
||||||
<type>array</type>
|
|
||||||
<el>
|
|
||||||
<switchableControllerActions>
|
|
||||||
<TCEforms>
|
|
||||||
<label>Select function</label>
|
|
||||||
<config>
|
|
||||||
<type>select</type>
|
|
||||||
<items>
|
|
||||||
<numIndex index="0">
|
|
||||||
<numIndex index="0">Translation</numIndex>
|
|
||||||
<numIndex index="1">Translation->translations</numIndex>
|
|
||||||
</numIndex>
|
|
||||||
</items>
|
|
||||||
</config>
|
|
||||||
</TCEforms>
|
|
||||||
</switchableControllerActions>
|
|
||||||
</el>
|
|
||||||
</ROOT>
|
|
||||||
</sDEF>
|
|
||||||
</sheets>
|
|
||||||
</T3DataStructure>
|
|
10
Configuration/Services.yaml
Normal file
10
Configuration/Services.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
services:
|
||||||
|
_defaults:
|
||||||
|
autowire: true
|
||||||
|
autoconfigure: true
|
||||||
|
public: false
|
||||||
|
Cjel\TemplatesAide\:
|
||||||
|
resource: '../Classes/*'
|
||||||
|
exclude: '../Classes/Standalone/*'
|
||||||
|
Cjel\TemplatesAide\Utility\ApiUtility:
|
||||||
|
public: true
|
8
Configuration/TCA/Overrides/pages.php
Normal file
8
Configuration/TCA/Overrides/pages.php
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
use \TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
|
||||||
|
|
||||||
|
ExtensionManagementUtility::registerPageTSConfigFile(
|
||||||
|
'templates_aide',
|
||||||
|
'Resources/Private/PageTSConfig/default.tsconfig',
|
||||||
|
'Default Config'
|
||||||
|
);
|
@ -1,14 +0,0 @@
|
|||||||
<?php
|
|
||||||
defined('TYPO3_MODE') || die();
|
|
||||||
|
|
||||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
|
||||||
'TemplatesAide',
|
|
||||||
'Dummy',
|
|
||||||
'dummy'
|
|
||||||
);
|
|
||||||
|
|
||||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
|
||||||
'TemplatesAide',
|
|
||||||
'Translationplugin',
|
|
||||||
'translation'
|
|
||||||
);
|
|
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
defined('TYPO3_MODE') || die('Access denied.');
|
defined('TYPO3') or die();
|
||||||
|
|
||||||
call_user_func(function() {
|
call_user_func(function() {
|
||||||
unset($GLOBALS['TCA']['tx_templatesaide_domain_model_dummy']);
|
unset($GLOBALS['TCA']['tx_templatesaide_domain_model_dummy']);
|
||||||
|
@ -8,7 +8,7 @@ return [
|
|||||||
'cruser_id' => 'cruser_id',
|
'cruser_id' => 'cruser_id',
|
||||||
'versioningWS' => true,
|
'versioningWS' => true,
|
||||||
'languageField' => 'sys_language_uid',
|
'languageField' => 'sys_language_uid',
|
||||||
'transOrigPointerField' => 'l10n_parent',
|
|
||||||
'transOrigDiffSourceField' => 'l10n_diffsource',
|
'transOrigDiffSourceField' => 'l10n_diffsource',
|
||||||
'delete' => 'deleted',
|
'delete' => 'deleted',
|
||||||
'enablecolumns' => [
|
'enablecolumns' => [
|
||||||
@ -23,14 +23,24 @@ return [
|
|||||||
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, ',
|
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, ',
|
||||||
],
|
],
|
||||||
'types' => [
|
'types' => [
|
||||||
'1' => ['showitem' => ', --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language, sys_language_uid, l10n_parent, l10n_diffsource, --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access, hidden, starttime, endtime'],
|
'1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, , --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'],
|
||||||
],
|
],
|
||||||
'columns' => [
|
'columns' => [
|
||||||
'sys_language_uid' => [
|
'sys_language_uid' => [
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||||
'config' => [
|
'config' => [
|
||||||
'type' => 'language',
|
'type' => 'select',
|
||||||
|
'renderType' => 'selectSingle',
|
||||||
|
'special' => 'languages',
|
||||||
|
'items' => [
|
||||||
|
[
|
||||||
|
'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages',
|
||||||
|
-1,
|
||||||
|
'flags-multiple'
|
||||||
|
]
|
||||||
|
],
|
||||||
|
'default' => 0,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'l10n_parent' => [
|
'l10n_parent' => [
|
||||||
|
@ -1,110 +0,0 @@
|
|||||||
<?php
|
|
||||||
return [
|
|
||||||
'ctrl' => [
|
|
||||||
'title' => 'LLL:EXT:templates_aide/Resources/Private/Language/locallang_db.xlf:tx_templatesaide_domain_model_translation',
|
|
||||||
'label' => 'uid',
|
|
||||||
'tstamp' => 'tstamp',
|
|
||||||
'crdate' => 'crdate',
|
|
||||||
'cruser_id' => 'cruser_id',
|
|
||||||
'versioningWS' => true,
|
|
||||||
'languageField' => 'sys_language_uid',
|
|
||||||
'transOrigPointerField' => 'l10n_parent',
|
|
||||||
'transOrigDiffSourceField' => 'l10n_diffsource',
|
|
||||||
'delete' => 'deleted',
|
|
||||||
'enablecolumns' => [
|
|
||||||
'disabled' => 'hidden',
|
|
||||||
'starttime' => 'starttime',
|
|
||||||
'endtime' => 'endtime',
|
|
||||||
],
|
|
||||||
'searchFields' => '',
|
|
||||||
'iconfile' => 'EXT:templates_aide/Resources/Public/Icons/tx_templatesaide_domain_model_translation.gif'
|
|
||||||
],
|
|
||||||
'interface' => [
|
|
||||||
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, ',
|
|
||||||
],
|
|
||||||
'types' => [
|
|
||||||
'1' => ['showitem' => ', --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language, sys_language_uid, l10n_parent, l10n_diffsource, --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access, hidden, starttime, endtime'],
|
|
||||||
],
|
|
||||||
'columns' => [
|
|
||||||
'sys_language_uid' => [
|
|
||||||
'exclude' => true,
|
|
||||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
|
||||||
'config' => [
|
|
||||||
'type' => 'language',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
'l10n_parent' => [
|
|
||||||
'displayCond' => 'FIELD:sys_language_uid:>:0',
|
|
||||||
'exclude' => true,
|
|
||||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
|
||||||
'config' => [
|
|
||||||
'type' => 'select',
|
|
||||||
'renderType' => 'selectSingle',
|
|
||||||
'default' => 0,
|
|
||||||
'items' => [
|
|
||||||
['', 0],
|
|
||||||
],
|
|
||||||
'foreign_table' => 'tx_templatesaide_domain_model_translation',
|
|
||||||
'foreign_table_where' => 'AND {#tx_templatesaide_domain_model_translation}.{#pid}=###CURRENT_PID### AND {#tx_templatesaide_domain_model_translation}.{#sys_language_uid} IN (-1,0)',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
'l10n_diffsource' => [
|
|
||||||
'config' => [
|
|
||||||
'type' => 'passthrough',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
't3ver_label' => [
|
|
||||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel',
|
|
||||||
'config' => [
|
|
||||||
'type' => 'input',
|
|
||||||
'size' => 30,
|
|
||||||
'max' => 255,
|
|
||||||
],
|
|
||||||
],
|
|
||||||
'hidden' => [
|
|
||||||
'exclude' => true,
|
|
||||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.visible',
|
|
||||||
'config' => [
|
|
||||||
'type' => 'check',
|
|
||||||
'renderType' => 'checkboxToggle',
|
|
||||||
'items' => [
|
|
||||||
[
|
|
||||||
0 => '',
|
|
||||||
1 => '',
|
|
||||||
'invertStateDisplay' => true
|
|
||||||
]
|
|
||||||
],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
'starttime' => [
|
|
||||||
'exclude' => true,
|
|
||||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
|
|
||||||
'config' => [
|
|
||||||
'type' => 'input',
|
|
||||||
'renderType' => 'inputDateTime',
|
|
||||||
'eval' => 'datetime,int',
|
|
||||||
'default' => 0,
|
|
||||||
'behaviour' => [
|
|
||||||
'allowLanguageSynchronization' => true
|
|
||||||
]
|
|
||||||
],
|
|
||||||
],
|
|
||||||
'endtime' => [
|
|
||||||
'exclude' => true,
|
|
||||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
|
|
||||||
'config' => [
|
|
||||||
'type' => 'input',
|
|
||||||
'renderType' => 'inputDateTime',
|
|
||||||
'eval' => 'datetime,int',
|
|
||||||
'default' => 0,
|
|
||||||
'range' => [
|
|
||||||
'upper' => mktime(0, 0, 0, 1, 1, 2038)
|
|
||||||
],
|
|
||||||
'behaviour' => [
|
|
||||||
'allowLanguageSynchronization' => true
|
|
||||||
]
|
|
||||||
],
|
|
||||||
],
|
|
||||||
|
|
||||||
],
|
|
||||||
];
|
|
@ -14,21 +14,6 @@ plugin.tx_templatesaide_dummy {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
plugin.tx_templatesaide_translationplugin {
|
|
||||||
view {
|
|
||||||
# cat=plugin.tx_templatesaide_translationplugin/file; type=string; label=Path to template root (FE)
|
|
||||||
templateRootPath = EXT:templates_aide/Resources/Private/Templates/
|
|
||||||
# cat=plugin.tx_templatesaide_translationplugin/file; type=string; label=Path to template partials (FE)
|
|
||||||
partialRootPath = EXT:templates_aide/Resources/Private/Partials/
|
|
||||||
# cat=plugin.tx_templatesaide_translationplugin/file; type=string; label=Path to template layouts (FE)
|
|
||||||
layoutRootPath = EXT:templates_aide/Resources/Private/Layouts/
|
|
||||||
}
|
|
||||||
persistence {
|
|
||||||
# cat=plugin.tx_templatesaide_translationplugin//a; type=string; label=Default storage PID
|
|
||||||
storagePid =
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
## EXTENSION BUILDER DEFAULTS END TOKEN - Everything BEFORE this line is overwritten with the defaults of the extension builder
|
## EXTENSION BUILDER DEFAULTS END TOKEN - Everything BEFORE this line is overwritten with the defaults of the extension builder
|
||||||
|
|
||||||
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:templates_aide/Resources/Private/TypoScript/constants.ts">
|
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:templates_aide/Resources/Private/TypoScript/constants.ts">
|
@ -1,11 +1,11 @@
|
|||||||
|
|
||||||
plugin.tx_templatesaide_dummy {
|
plugin.tx_templatesaide_dummy {
|
||||||
view {
|
view {
|
||||||
templateRootPaths.0 = EXT:templates_aide/Resources/Private/Templates/
|
templateRootPaths.0 = EXT:{extension.shortExtensionKey}/Resources/Private/Templates/
|
||||||
templateRootPaths.1 = {$plugin.tx_templatesaide_dummy.view.templateRootPath}
|
templateRootPaths.1 = {$plugin.tx_templatesaide_dummy.view.templateRootPath}
|
||||||
partialRootPaths.0 = EXT:templates_aide/Resources/Private/Partials/
|
partialRootPaths.0 = EXT:templates_aide/Resources/Private/Partials/
|
||||||
partialRootPaths.1 = {$plugin.tx_templatesaide_dummy.view.partialRootPath}
|
partialRootPaths.1 = {$plugin.tx_templatesaide_dummy.view.partialRootPath}
|
||||||
layoutRootPaths.0 = EXT:templates_aide/Resources/Private/Layouts/
|
layoutRootPaths.0 = EXT:tx_templatesaide/Resources/Private/Layouts/
|
||||||
layoutRootPaths.1 = {$plugin.tx_templatesaide_dummy.view.layoutRootPath}
|
layoutRootPaths.1 = {$plugin.tx_templatesaide_dummy.view.layoutRootPath}
|
||||||
}
|
}
|
||||||
persistence {
|
persistence {
|
||||||
@ -24,31 +24,6 @@ plugin.tx_templatesaide_dummy {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
plugin.tx_templatesaide_translationplugin {
|
|
||||||
view {
|
|
||||||
templateRootPaths.0 = EXT:templates_aide/Resources/Private/Templates/
|
|
||||||
templateRootPaths.1 = {$plugin.tx_templatesaide_translationplugin.view.templateRootPath}
|
|
||||||
partialRootPaths.0 = EXT:templates_aide/Resources/Private/Partials/
|
|
||||||
partialRootPaths.1 = {$plugin.tx_templatesaide_translationplugin.view.partialRootPath}
|
|
||||||
layoutRootPaths.0 = EXT:templates_aide/Resources/Private/Layouts/
|
|
||||||
layoutRootPaths.1 = {$plugin.tx_templatesaide_translationplugin.view.layoutRootPath}
|
|
||||||
}
|
|
||||||
persistence {
|
|
||||||
storagePid = {$plugin.tx_templatesaide_translationplugin.persistence.storagePid}
|
|
||||||
#recursive = 1
|
|
||||||
}
|
|
||||||
features {
|
|
||||||
#skipDefaultArguments = 1
|
|
||||||
# if set to 1, the enable fields are ignored in BE context
|
|
||||||
ignoreAllEnableFieldsInBe = 0
|
|
||||||
# Should be on by default, but can be disabled if all action in the plugin are uncached
|
|
||||||
requireCHashArgumentForActionArguments = 1
|
|
||||||
}
|
|
||||||
mvc {
|
|
||||||
#callDefaultActionIfActionCantBeResolved = 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# these classes are only used in auto-generated templates
|
# these classes are only used in auto-generated templates
|
||||||
plugin.tx_templatesaide._CSS_DEFAULT_STYLE (
|
plugin.tx_templatesaide._CSS_DEFAULT_STYLE (
|
||||||
textarea.f3-form-error {
|
textarea.f3-form-error {
|
||||||
|
@ -256,7 +256,7 @@ TYPO3:
|
|||||||
__inheritances:
|
__inheritances:
|
||||||
10: 'TYPO3.CMS.Form.mixins.finishersEmailMixin'
|
10: 'TYPO3.CMS.Form.mixins.finishersEmailMixin'
|
||||||
|
|
||||||
EmailToReceiver:
|
EmailsToReceiver:
|
||||||
__inheritances:
|
__inheritances:
|
||||||
10: 'TYPO3.CMS.Form.mixins.finishersEmailMixin'
|
10: 'TYPO3.CMS.Form.mixins.finishersEmailMixin'
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
.. include:: ../Includes.txt
|
.. include:: ../Includes.txt
|
||||||
|
|
||||||
|
|
||||||
.. _configuration:
|
.. _configuration:
|
||||||
|
|
||||||
@ -6,17 +7,20 @@
|
|||||||
Configuration
|
Configuration
|
||||||
=============
|
=============
|
||||||
|
|
||||||
How is the extension configured?
|
Target group: **Developers, Integrators**
|
||||||
Aim to provide simple instructions detailing how the extension is configured.
|
|
||||||
Always assume that the user has no prior experience of using the extension.
|
How is the extension configured? Aim to provide simple instructions detailing
|
||||||
|
how the extension is configured. Always assume that the user has no prior experience
|
||||||
|
of using your extension.
|
||||||
|
|
||||||
|
Try and provide a typical use case for your extension and detail each of the
|
||||||
|
steps required to get the extension running.
|
||||||
|
|
||||||
Try and provide a typical use case for your extension
|
|
||||||
and detail each of the steps required to get the extension running.
|
|
||||||
|
|
||||||
Typical Example
|
Typical Example
|
||||||
===============
|
===============
|
||||||
|
|
||||||
- Does the integrator need to include a static template?
|
- Do we need to include a static template?
|
||||||
- For example add a code snippet with comments
|
- For example add a code snippet with comments
|
||||||
|
|
||||||
Minimal example of TypoScript:
|
Minimal example of TypoScript:
|
||||||
@ -39,12 +43,12 @@ Minimal example of TypoScript:
|
|||||||
TypoScript Reference
|
TypoScript Reference
|
||||||
====================
|
====================
|
||||||
|
|
||||||
Possible subsections: Reference of TypoScript options.
|
When detailing data types or standard TypoScript
|
||||||
The construct below show the recommended structure for TypoScript properties listing and description.
|
features, don't hesitate to cross-link to the TypoScript
|
||||||
|
Reference.
|
||||||
|
|
||||||
When detailing data types or standard TypoScript features,
|
Information about how to use cross-references:
|
||||||
don't hesitate to cross-link to the TypoScript Reference as shown below.
|
https://docs.typo3.org/typo3cms/HowToDocument/WritingReST/Hyperlinks.html
|
||||||
|
|
||||||
See :ref:`h2document:how-to-document-hyperlinks` for information about how to use cross-references.
|
|
||||||
|
|
||||||
See the :file:`Settings.cfg` file for the declaration of cross-linking keys.
|
See the :file:`Settings.cfg` file for the declaration of cross-linking keys.
|
||||||
|
You can add more keys besides tsref.
|
||||||
|
@ -38,47 +38,6 @@
|
|||||||
"relations": []
|
"relations": []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
"config": {
|
|
||||||
"position": [
|
|
||||||
398,
|
|
||||||
234
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"name": "New Model Object",
|
|
||||||
"value": {
|
|
||||||
"actionGroup": {
|
|
||||||
"_default0_list": false,
|
|
||||||
"_default1_show": false,
|
|
||||||
"_default2_new_create": false,
|
|
||||||
"_default3_edit_update": false,
|
|
||||||
"_default4_delete": false,
|
|
||||||
"customActions": [
|
|
||||||
"translations"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"name": "Translation",
|
|
||||||
"objectsettings": {
|
|
||||||
"addDeletedField": true,
|
|
||||||
"addHiddenField": true,
|
|
||||||
"addStarttimeEndtimeFields": true,
|
|
||||||
"aggregateRoot": false,
|
|
||||||
"categorizable": false,
|
|
||||||
"description": "",
|
|
||||||
"mapToTable": "",
|
|
||||||
"parentClass": "",
|
|
||||||
"sorting": false,
|
|
||||||
"type": "Entity",
|
|
||||||
"uid": "291507465262"
|
|
||||||
},
|
|
||||||
"propertyGroup": {
|
|
||||||
"properties": []
|
|
||||||
},
|
|
||||||
"relationGroup": {
|
|
||||||
"relations": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -87,13 +46,13 @@
|
|||||||
"emConf": {
|
"emConf": {
|
||||||
"category": "plugin",
|
"category": "plugin",
|
||||||
"custom_category": "",
|
"custom_category": "",
|
||||||
"dependsOn": "typo3 => 8.7.0-9.5.99\n",
|
"dependsOn": "typo3 => 8.7.0-11.5.99\n",
|
||||||
"disableLocalization": false,
|
"disableLocalization": false,
|
||||||
"disableVersioning": false,
|
"disableVersioning": false,
|
||||||
"skipGenerateDocumentationTemplate": false,
|
"skipGenerateDocumentationTemplate": false,
|
||||||
"sourceLanguage": "en",
|
"sourceLanguage": "en",
|
||||||
"state": "alpha",
|
"state": "alpha",
|
||||||
"targetVersion": "9.5.0-9.5.99",
|
"targetVersion": "9.5.0-11.5.99",
|
||||||
"version": "0.0.1"
|
"version": "0.0.1"
|
||||||
},
|
},
|
||||||
"extensionKey": "templates_aide",
|
"extensionKey": "templates_aide",
|
||||||
@ -118,25 +77,14 @@
|
|||||||
"description": "",
|
"description": "",
|
||||||
"key": "dummy",
|
"key": "dummy",
|
||||||
"name": "dummy"
|
"name": "dummy"
|
||||||
},
|
|
||||||
{
|
|
||||||
"actions": {
|
|
||||||
"controllerActionCombinations": "Translation => translations",
|
|
||||||
"noncacheableActions": "",
|
|
||||||
"switchableActions": ""
|
|
||||||
},
|
|
||||||
"description": "",
|
|
||||||
"key": "translationplugin",
|
|
||||||
"name": "translation"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"vendorName": "Cjel"
|
"vendorName": "Cjel"
|
||||||
},
|
},
|
||||||
"wires": [],
|
"wires": [],
|
||||||
"storagePath": "\/var\/www\/html\/webroot\/typo3conf\/ext\/",
|
|
||||||
"log": {
|
"log": {
|
||||||
"last_modified": "2024-02-07 06:12",
|
"last_modified": "2020-04-26 10:03",
|
||||||
"extension_builder_version": "9.10.6",
|
"extension_builder_version": "9.10.2",
|
||||||
"be_user": " (68)"
|
"be_user": " (1)"
|
||||||
}
|
}
|
||||||
}
|
}
|
3
Makefile.old
Normal file
3
Makefile.old
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
add_upstreams:
|
||||||
|
git remote add upstream-dt git@git.datentonne.net:typo3/template_aide.git
|
||||||
|
git remote add upstream-gs ssh://vcs@phabricator.glanzstueck.agency/source/typo3-template_aide.git
|
@ -1,25 +1,24 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||||
<xliff version="1.0">
|
<xliff version="1.0">
|
||||||
<file source-language="en" datatype="plaintext" original="EXT:templates_aide/Resources/Private/Language/locallang" date="2024-02-07T18:12:19Z" product-name="templates_aide">
|
<file source-language="en" datatype="plaintext" original="messages" date="2022-04-28T10:23:09Z">
|
||||||
<header/>
|
<header>
|
||||||
|
<generator>LFEditor</generator>
|
||||||
|
</header>
|
||||||
<body>
|
<body>
|
||||||
<trans-unit id="tx_templatesaide_domain_model_dummy" resname="tx_templatesaide_domain_model_dummy">
|
<trans-unit id="default">
|
||||||
<source>Dummy</source>
|
<source><![CDATA[Default]]></source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="tx_templatesaide_domain_model_translation" resname="tx_templatesaide_domain_model_translation">
|
<trans-unit id="disableDragModal">
|
||||||
<source>Translation</source>
|
<source><![CDATA[Disable drag and drop confirmation in page tree]]></source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="default" resname="default">
|
<trans-unit id="homepage">
|
||||||
<source>Default</source>
|
<source><![CDATA[Homepage]]></source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="disableDragModal" resname="disableDragModal">
|
<trans-unit id="subpage">
|
||||||
<source>Disable drag and drop confirmation in page tree</source>
|
<source><![CDATA[Subpage]]></source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="homepage" resname="homepage">
|
<trans-unit id="tx_templatesaide_domain_model_dummy">
|
||||||
<source>Homepage</source>
|
<source><![CDATA[Dummy]]></source>
|
||||||
</trans-unit>
|
|
||||||
<trans-unit id="subpage" resname="subpage">
|
|
||||||
<source>Subpage</source>
|
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
</body>
|
</body>
|
||||||
</file>
|
</file>
|
||||||
|
@ -1,30 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||||
<xliff version="1.0">
|
<xliff version="1.0">
|
||||||
<file source-language="en" datatype="plaintext" original="EXT:templates_aide/Resources/Private/Language/locallang_db" date="2024-02-07T18:12:19Z" product-name="templates_aide">
|
<file source-language="en" datatype="plaintext" original="messages" date="2020-04-26T22:03:44Z" product-name="templates_aide">
|
||||||
<header/>
|
<header/>
|
||||||
<body>
|
<body>
|
||||||
<trans-unit id="tx_templatesaide_domain_model_dummy" resname="tx_templatesaide_domain_model_dummy">
|
<trans-unit id="tx_templatesaide_domain_model_dummy">
|
||||||
<source>Dummy</source>
|
<source>Dummy</source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="tx_templatesaide_domain_model_translation" resname="tx_templatesaide_domain_model_translation">
|
<trans-unit id="tx_templates_aide_dummy.name">
|
||||||
<source>Translation</source>
|
|
||||||
</trans-unit>
|
|
||||||
<trans-unit id="tx_templates_aide_dummy.name" resname="tx_templates_aide_dummy.name">
|
|
||||||
<source>dummy</source>
|
<source>dummy</source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="tx_templates_aide_dummy.description" resname="tx_templates_aide_dummy.description">
|
<trans-unit id="tx_templates_aide_dummy.description">
|
||||||
<source></source>
|
|
||||||
</trans-unit>
|
|
||||||
<trans-unit id="tx_templates_aide_translationplugin.name" resname="tx_templates_aide_translationplugin.name">
|
|
||||||
<source>translation</source>
|
|
||||||
</trans-unit>
|
|
||||||
<trans-unit id="tx_templates_aide_translationplugin.description" resname="tx_templates_aide_translationplugin.description">
|
|
||||||
<source></source>
|
|
||||||
</trans-unit>
|
|
||||||
<trans-unit id="tx_templates_aide_translation.name" resname="tx_templates_aide_translation.name">
|
|
||||||
<source>translation</source>
|
|
||||||
</trans-unit>
|
|
||||||
<trans-unit id="tx_templates_aide_translation.description" resname="tx_templates_aide_translation.description">
|
|
||||||
<source></source>
|
<source></source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
</body>
|
</body>
|
||||||
|
@ -18,33 +18,18 @@
|
|||||||
<f:variable name="buttonBackgroundcolor" value="#8ABF6F" />
|
<f:variable name="buttonBackgroundcolor" value="#8ABF6F" />
|
||||||
</f:else>
|
</f:else>
|
||||||
</f:if>
|
</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="widthPadded" value="{width - padding - padding}" />
|
||||||
<f:variable name="widthTableColumn" value="{widthPadded / 2}" />
|
<f:variable name="widthTableColumn" value="{widthPadded / 2}" />
|
||||||
|
|
||||||
<f:for each="{content}" as="row" key="rowKey" iteration="rowI" >
|
<f:for each="{content}" as="row" key="rowKey" iteration="rowI" >
|
||||||
<v:condition.type.isArray value="{row.data}">
|
<v:condition.type.isArray value="{row.data}">
|
||||||
<f:else>
|
<f:else>
|
||||||
<f:if condition="{row.type} == 'contentBlockHtml'">
|
|
||||||
{row.data -> f:format.raw()}
|
|
||||||
</f:if>
|
|
||||||
<f:if condition="{v:condition.string.contains(haystack: '{row.type}', needle: 'headline', then: '1')}
|
<f:if condition="{v:condition.string.contains(haystack: '{row.type}', needle: 'headline', then: '1')}
|
||||||
|| {row.type} == 'text'
|
|| {row.type} == 'text'
|
||||||
|| {row.type} == 'button'
|
|| {row.type} == 'button'
|
||||||
|| {row.type} == 'buttonleft'
|
|| {row.type} == 'buttonleft'
|
||||||
|| {row.type} == 'buttoncenter'
|
|| {row.type} == 'buttoncenter'
|
||||||
|| {row.type} == 'buttonright'
|
|| {row.type} == 'buttonright'
|
||||||
|| {row.type} == 'divider'
|
|
||||||
|| {row.type} == 'hr'
|
|
||||||
">
|
">
|
||||||
<!--[if mso | IE]>
|
<!--[if mso | IE]>
|
||||||
<table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:{width}px;" width="{width}" >
|
<table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:{width}px;" width="{width}" >
|
||||||
@ -65,14 +50,6 @@
|
|||||||
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%">
|
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<f:switch expression="{row.type}">
|
|
||||||
<f:case value="divider">
|
|
||||||
<f:variable name='paddingTd' value='20px 0' />
|
|
||||||
</f:case>
|
|
||||||
<f:defaultCase>
|
|
||||||
<f:variable name='paddingTd' value='0' />
|
|
||||||
</f:defaultCase>
|
|
||||||
</f:switch>
|
|
||||||
<td style="vertical-align:top;padding:0;">
|
<td style="vertical-align:top;padding:0;">
|
||||||
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style width="100%">
|
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
@ -87,11 +64,11 @@
|
|||||||
<f:variable name='align' value='left' />
|
<f:variable name='align' value='left' />
|
||||||
</f:defaultCase>
|
</f:defaultCase>
|
||||||
</f:switch>
|
</f:switch>
|
||||||
<td align="{align}" style="font-size:0px;padding:{paddingTd};word-break:break-word;">
|
<td align="{align}" style="font-size:0px;padding:0;word-break:break-word;">
|
||||||
<div style="font-family:Arial, sans-serif;font-size:16px;line-height:1.4;text-align:{align};color:#000000;">
|
<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:switch expression="{row.type}">
|
||||||
<f:case value="headline">
|
<f:case value="headline">
|
||||||
<h1 style="{styleH1}">{row.data -> f:format.nl2br() -> f:format.raw()}</h1>
|
<h1>{row.data -> f:format.nl2br() -> f:format.raw()}</h1>
|
||||||
</f:case>
|
</f:case>
|
||||||
<f:case value="headline2">
|
<f:case value="headline2">
|
||||||
<h2>{row.data -> f:format.nl2br() -> f:format.raw()}</h2>
|
<h2>{row.data -> f:format.nl2br() -> f:format.raw()}</h2>
|
||||||
@ -113,7 +90,7 @@
|
|||||||
<span style="display: inline-block;" class="buttonwrapper">
|
<span style="display: inline-block;" class="buttonwrapper">
|
||||||
<f:variable name="rowData">{row.data -> v:format.json.decode()}</f:variable>
|
<f:variable name="rowData">{row.data -> v:format.json.decode()}</f:variable>
|
||||||
<a style="display: inline-block; color: {buttonColor}" target="_blank" href="{rowData.0}">
|
<a style="display: inline-block; color: {buttonColor}" target="_blank" href="{rowData.0}">
|
||||||
<span style="display: inline-block; background-color: {buttonBackgroundcolor}; {styleButton}">
|
<span style="display: inline-block; padding: 10px 15px; border-radius: 3px; background-color: {buttonBackgroundcolor};">
|
||||||
{rowData.1}
|
{rowData.1}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
@ -124,38 +101,6 @@
|
|||||||
{row.data -> f:format.nl2br() -> f:format.raw()}
|
{row.data -> f:format.nl2br() -> f:format.raw()}
|
||||||
</span>
|
</span>
|
||||||
</f:case>
|
</f:case>
|
||||||
<f:case value="hr">
|
|
||||||
<p style="border-top:solid 1px #bababa;font-size:1px;margin:13px auto;width:100%;">
|
|
||||||
</p>
|
|
||||||
<!--[if mso | IE]>
|
|
||||||
|
|
||||||
<table
|
|
||||||
align="center"
|
|
||||||
border="0"
|
|
||||||
cellpadding="0"
|
|
||||||
cellspacing="0"
|
|
||||||
style="border-top:solid 1px #bababa;font-size:1px;margin:13px auto;width:100%;"
|
|
||||||
role="presentation"
|
|
||||||
width="550px"
|
|
||||||
>
|
|
||||||
<tr>
|
|
||||||
<td style="height:0;line-height:0;">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<![endif]-->
|
|
||||||
</f:case>
|
|
||||||
<f:case value="divider">
|
|
||||||
<p style="border-top:solid 2px #025093;font-size:1px;margin:0px auto;width:100%;">
|
|
||||||
</p>
|
|
||||||
<!--[if mso | IE]>
|
|
||||||
<table align="center" border="0" cellpadding="0" cellspacing="0" style="border-top:solid 2px #025093;font-size:1px;margin:0px auto;width:550px;" role="presentation" width="550px" >
|
|
||||||
<tr><td style="height:0;line-height:0;"> </td></tr>
|
|
||||||
</table>
|
|
||||||
<![endif]-->
|
|
||||||
</f:case>
|
|
||||||
<f:defaultCase>
|
<f:defaultCase>
|
||||||
<p>{row.data -> f:format.nl2br() -> f:format.raw()}</p>
|
<p>{row.data -> f:format.nl2br() -> f:format.raw()}</p>
|
||||||
</f:defaultCase>
|
</f:defaultCase>
|
||||||
@ -192,9 +137,6 @@
|
|||||||
<f:case value="table">
|
<f:case value="table">
|
||||||
<f:variable name="type" value="table" />
|
<f:variable name="type" value="table" />
|
||||||
</f:case>
|
</f:case>
|
||||||
<f:case value="tablelr">
|
|
||||||
<f:variable name="type" value="table" />
|
|
||||||
</f:case>
|
|
||||||
<f:case value="tableLayout">
|
<f:case value="tableLayout">
|
||||||
<f:variable name="type" value="table" />
|
<f:variable name="type" value="table" />
|
||||||
</f:case>
|
</f:case>
|
||||||
@ -236,19 +178,11 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="" style="vertical-align:top;width:{widthTableColumn}px;">
|
<td class="" style="vertical-align:top;width:{widthTableColumn}px;">
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
<f:switch expression="{row.type}">
|
<div class="mj-column-per-50 outlook-group-fix" style="font-size:13px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
|
||||||
<f:case value="tablelr">
|
|
||||||
<f:variable name="align" value="right" />
|
|
||||||
</f:case>
|
|
||||||
<f:defaultCase>
|
|
||||||
<f:variable name="align" value="left" />
|
|
||||||
</f:defaultCase>
|
|
||||||
</f:switch>
|
|
||||||
<div class="mj-column-per-50 outlook-group-fix" style="font-size:13px;text-align:{align};direction:ltr;display:inline-block;vertical-align:top;width:100%;">
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
|
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="{align}" style="font-size:0px;padding:0px 4px;word-break:break-word;">
|
<td align="left" style="font-size:0px;padding:0px 4px;word-break:break-word;">
|
||||||
<div style="font-family:Arial, sans-serif;font-size:16px;line-height:1.4;text-align:{align};color:#000000;">
|
<div style="font-family:Arial, sans-serif;font-size:16px;line-height:1.4;text-align:left;color:#000000;">
|
||||||
<div>{row.data.1 -> f:format.nl2br() -> f:format.raw()}</div>
|
<div>{row.data.1 -> f:format.nl2br() -> f:format.raw()}</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
@ -55,19 +55,3 @@ pageContentelement {
|
|||||||
no_cache = 1
|
no_cache = 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pageTranslation = PAGE
|
|
||||||
pageTranslation {
|
|
||||||
typeNum = 6001
|
|
||||||
10 = USER_INT
|
|
||||||
10 {
|
|
||||||
userFunc = Cjel\TemplatesAide\UserFunc\Translation->render
|
|
||||||
}
|
|
||||||
config {
|
|
||||||
disableAllHeaderCode = 1
|
|
||||||
xhtml_cleaning = 0
|
|
||||||
admPanel = 0
|
|
||||||
debug = 0
|
|
||||||
no_cache = 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 230 B |
@ -1,4 +1 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#666" d="M12.053 11.026c-.238.07-.427.095-.674.095-2.033 0-5.017-7.1-5.017-9.462 0-.87.207-1.16.497-1.41C4.373.54 1.39 1.452.435 2.613c-.207.29-.332.746-.332 1.326C.103 7.628 4.04 16 6.82 16c1.283 0 3.45-2.114 5.233-4.974M10.756 0c2.57 0 5.14.415 5.14 1.865 0 2.943-1.865 6.508-2.818 6.508-1.7 0-3.814-4.725-3.814-7.088C9.264.207 9.68 0 10.756 0"/></svg>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
|
||||||
<path fill="#666" d="M12.053 11.026c-.238.07-.427.095-.674.095-2.033 0-5.017-7.1-5.017-9.462 0-.87.207-1.16.497-1.41C4.373.54 1.39 1.452.435 2.613c-.207.29-.332.746-.332 1.326C.103 7.628 4.04 16 6.82 16c1.283 0 3.45-2.114 5.233-4.974M10.756 0c2.57 0 5.14.415 5.14 1.865 0 2.943-1.865 6.508-2.818 6.508-1.7 0-3.814-4.725-3.814-7.088C9.264.207 9.68 0 10.756 0"></path>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 476 B After Width: | Height: | Size: 426 B |
@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
|
||||||
<path fill="#666" d="M12.053 11.026c-.238.07-.427.095-.674.095-2.033 0-5.017-7.1-5.017-9.462 0-.87.207-1.16.497-1.41C4.373.54 1.39 1.452.435 2.613c-.207.29-.332.746-.332 1.326C.103 7.628 4.04 16 6.82 16c1.283 0 3.45-2.114 5.233-4.974M10.756 0c2.57 0 5.14.415 5.14 1.865 0 2.943-1.865 6.508-2.818 6.508-1.7 0-3.814-4.725-3.814-7.088C9.264.207 9.68 0 10.756 0"></path>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 476 B |
@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
|
||||||
<path fill="#666" d="M12.053 11.026c-.238.07-.427.095-.674.095-2.033 0-5.017-7.1-5.017-9.462 0-.87.207-1.16.497-1.41C4.373.54 1.39 1.452.435 2.613c-.207.29-.332.746-.332 1.326C.103 7.628 4.04 16 6.82 16c1.283 0 3.45-2.114 5.233-4.974M10.756 0c2.57 0 5.14.415 5.14 1.865 0 2.943-1.865 6.508-2.818 6.508-1.7 0-3.814-4.725-3.814-7.088C9.264.207 9.68 0 10.756 0"></path>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 476 B |
@ -1,30 +0,0 @@
|
|||||||
<?php
|
|
||||||
namespace Cjel\TemplatesAide\Tests\Unit\Controller;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test case.
|
|
||||||
*
|
|
||||||
* @author Philipp Dieter <philippdieter@attic-media.net>
|
|
||||||
*/
|
|
||||||
class TranslationControllerTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @var \Cjel\TemplatesAide\Controller\TranslationController
|
|
||||||
*/
|
|
||||||
protected $subject = null;
|
|
||||||
|
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
parent::setUp();
|
|
||||||
$this->subject = $this->getMockBuilder(\Cjel\TemplatesAide\Controller\TranslationController::class)
|
|
||||||
->setMethods(['redirect', 'forward', 'addFlashMessage'])
|
|
||||||
->disableOriginalConstructor()
|
|
||||||
->getMock();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function tearDown()
|
|
||||||
{
|
|
||||||
parent::tearDown();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,34 +0,0 @@
|
|||||||
<?php
|
|
||||||
namespace Cjel\TemplatesAide\Tests\Unit\Domain\Model;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test case.
|
|
||||||
*
|
|
||||||
* @author Philipp Dieter <philippdieter@attic-media.net>
|
|
||||||
*/
|
|
||||||
class TranslationTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @var \Cjel\TemplatesAide\Domain\Model\Translation
|
|
||||||
*/
|
|
||||||
protected $subject = null;
|
|
||||||
|
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
parent::setUp();
|
|
||||||
$this->subject = new \Cjel\TemplatesAide\Domain\Model\Translation();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function tearDown()
|
|
||||||
{
|
|
||||||
parent::tearDown();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @test
|
|
||||||
*/
|
|
||||||
public function dummyTestToNotLeaveThisFileEmpty()
|
|
||||||
{
|
|
||||||
self::markTestIncomplete();
|
|
||||||
}
|
|
||||||
}
|
|
@ -9,7 +9,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"typo3/cms-core": "8.7.0 - 11.99.99",
|
"typo3/cms-core": "8.7.0 - 11.5.99",
|
||||||
"sarhan/php-flatten": "^4.0"
|
"sarhan/php-flatten": "^4.0"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@ -23,7 +23,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"replace": {
|
"replace": {
|
||||||
"templates_aide": "self.version",
|
|
||||||
"typo3-ter/templates-aide": "self.version"
|
"typo3-ter/templates-aide": "self.version"
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"typo3/cms": {
|
||||||
|
"extension-key": "templates_aide"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,13 +16,14 @@ $EM_CONF[$_EXTKEY] = [
|
|||||||
'category' => 'plugin',
|
'category' => 'plugin',
|
||||||
'author' => 'Philipp Dieter',
|
'author' => 'Philipp Dieter',
|
||||||
'author_email' => 'philippdieter@attic-media.net',
|
'author_email' => 'philippdieter@attic-media.net',
|
||||||
'state' => 'alpha',
|
'state' => 'stable',
|
||||||
'uploadfolder' => 0,
|
'uploadfolder' => 0,
|
||||||
'createDirs' => '',
|
'createDirs' => '',
|
||||||
'clearCacheOnLoad' => 0,
|
'clearCacheOnLoad' => 0,
|
||||||
'version' => '0.0.1',
|
'version' => '0.0.1',
|
||||||
'constraints' => [
|
'constraints' => [
|
||||||
'depends' => [
|
'depends' => [
|
||||||
|
'typo3' => '8.7.0-11.99.99',
|
||||||
],
|
],
|
||||||
'conflicts' => [],
|
'conflicts' => [],
|
||||||
'suggests' => [],
|
'suggests' => [],
|
||||||
|
@ -1,60 +1,22 @@
|
|||||||
<?php
|
<?php
|
||||||
defined('TYPO3_MODE') || die('Access denied.');
|
defined('TYPO3') or die();
|
||||||
|
use Cjel\TemplatesAide\Controller\DummyController;
|
||||||
|
|
||||||
(static function() {
|
|
||||||
|
|
||||||
|
|
||||||
})();
|
|
||||||
|
|
||||||
call_user_func(
|
call_user_func(
|
||||||
function()
|
function()
|
||||||
{
|
{
|
||||||
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
|
||||||
|
|
||||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
|
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
|
||||||
'TemplatesAide',
|
'TemplatesAide',
|
||||||
'Translationplugin',
|
|
||||||
[
|
|
||||||
\Cjel\TemplatesAide\Controller\TranslationController::class => 'translations'
|
|
||||||
],
|
|
||||||
// non-cacheable actions
|
|
||||||
[
|
|
||||||
\Cjel\TemplatesAide\Controller\TranslationController::class => ''
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
|
|
||||||
'Cjel.TemplatesAide',
|
|
||||||
'Dummy',
|
'Dummy',
|
||||||
[
|
[
|
||||||
'Dummy' => 'list',
|
DummyController::class => 'list'
|
||||||
'Translation' => 'translations'
|
|
||||||
],
|
],
|
||||||
// non-cacheable actions
|
// non-cacheable actions
|
||||||
[
|
[
|
||||||
'Dummy' => '',
|
DummyController::class => ''
|
||||||
'Translation' => ''
|
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
|
|
||||||
'Cjel.TemplatesAide',
|
|
||||||
'Translationplugin',
|
|
||||||
[
|
|
||||||
'Translation' => 'translations'
|
|
||||||
],
|
|
||||||
// non-cacheable actions
|
|
||||||
[
|
|
||||||
'Dummy' => '',
|
|
||||||
'Translation' => ''
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// wizards
|
// wizards
|
||||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
|
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
|
||||||
'mod {
|
'mod {
|
||||||
@ -69,15 +31,6 @@ call_user_func(
|
|||||||
list_type = templatesaide_dummy
|
list_type = templatesaide_dummy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
translationplugin {
|
|
||||||
iconIdentifier = templates_aide-plugin-translationplugin
|
|
||||||
title = LLL:EXT:templates_aide/Resources/Private/Language/locallang_db.xlf:tx_templates_aide_translationplugin.name
|
|
||||||
description = LLL:EXT:templates_aide/Resources/Private/Language/locallang_db.xlf:tx_templates_aide_translationplugin.description
|
|
||||||
tt_content_defValues {
|
|
||||||
CType = list
|
|
||||||
list_type = templatesaide_translationplugin
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
show = *
|
show = *
|
||||||
}
|
}
|
||||||
@ -91,12 +44,6 @@ call_user_func(
|
|||||||
['source' => 'EXT:templates_aide/Resources/Public/Icons/user_plugin_dummy.svg']
|
['source' => 'EXT:templates_aide/Resources/Public/Icons/user_plugin_dummy.svg']
|
||||||
);
|
);
|
||||||
|
|
||||||
$iconRegistry->registerIcon(
|
|
||||||
'templates_aide-plugin-translationplugin',
|
|
||||||
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
|
|
||||||
['source' => 'EXT:templates_aide/Resources/Public/Icons/user_plugin_translationplugin.svg']
|
|
||||||
);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
## EXTENSION BUILDER DEFAULTS END TOKEN - Everything BEFORE this line is overwritten with the defaults of the extension builder
|
## EXTENSION BUILDER DEFAULTS END TOKEN - Everything BEFORE this line is overwritten with the defaults of the extension builder
|
||||||
@ -136,10 +83,5 @@ call_user_func(
|
|||||||
$_GET['eID'] = 'script_disabled';
|
$_GET['eID'] = 'script_disabled';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['script_enable'] =
|
|
||||||
// \Cjel\TemplatesAide\Controller\EIDController::class
|
|
||||||
// . '::scriptEnable';
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -1,37 +1,28 @@
|
|||||||
<?php
|
<?php
|
||||||
defined('TYPO3_MODE') || die('Access denied.');
|
defined('TYPO3') or die();
|
||||||
|
|
||||||
call_user_func(
|
call_user_func(
|
||||||
function()
|
function()
|
||||||
{
|
{
|
||||||
|
|
||||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
||||||
'Cjel.TemplatesAide',
|
'TemplatesAide',
|
||||||
'Dummy',
|
'Dummy',
|
||||||
'dummy'
|
'dummy'
|
||||||
);
|
);
|
||||||
|
|
||||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
|
||||||
'Cjel.TemplatesAide',
|
|
||||||
'Translationplugin',
|
|
||||||
'translation'
|
|
||||||
);
|
|
||||||
|
|
||||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('templates_aide', 'Configuration/TypoScript', 'Templates Aide');
|
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('templates_aide', 'Configuration/TypoScript', 'Templates Aide');
|
||||||
|
|
||||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_templatesaide_domain_model_dummy', 'EXT:templates_aide/Resources/Private/Language/locallang_csh_tx_templatesaide_domain_model_dummy.xlf');
|
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_templatesaide_domain_model_dummy', 'EXT:templates_aide/Resources/Private/Language/locallang_csh_tx_templatesaide_domain_model_dummy.xlf');
|
||||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_templatesaide_domain_model_dummy');
|
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_templatesaide_domain_model_dummy');
|
||||||
|
|
||||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_templatesaide_domain_model_translation', 'EXT:templates_aide/Resources/Private/Language/locallang_csh_tx_templatesaide_domain_model_translation.xlf');
|
|
||||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_templatesaide_domain_model_translation');
|
|
||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
## EXTENSION BUILDER DEFAULTS END TOKEN - Everything BEFORE this line is overwritten with the defaults of the extension builder
|
## EXTENSION BUILDER DEFAULTS END TOKEN - Everything BEFORE this line is overwritten with the defaults of the extension builder
|
||||||
|
|
||||||
use Cjel\TemplatesAide\Property\TypeConverter\Double2Converter;
|
use Cjel\TemplatesAide\Property\TypeConverter\Double2Converter;
|
||||||
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
|
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
|
||||||
|
use TYPO3\CMS\Core\Http\ApplicationType;
|
||||||
call_user_func(
|
call_user_func(
|
||||||
function()
|
function()
|
||||||
{
|
{
|
||||||
@ -39,45 +30,23 @@ call_user_func(
|
|||||||
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook'][] =
|
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook'][] =
|
||||||
\Cjel\TemplatesAide\Hooks\WizardItems::class;
|
\Cjel\TemplatesAide\Hooks\WizardItems::class;
|
||||||
|
|
||||||
|
|
||||||
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
|
||||||
if(\TYPO3\CMS\Core\Core\Environment::getContext()->isDevelopment()) {
|
if(\TYPO3\CMS\Core\Core\Environment::getContext()->isDevelopment()) {
|
||||||
$GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['dev'] =
|
$GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['dev'] =
|
||||||
'EXT:templates_aide/Resources/Public/Css/backend/dev';
|
'EXT:templates_aide/Resources/Public/Css/backend/dev';
|
||||||
}
|
}
|
||||||
|
|
||||||
if(\TYPO3\CMS\Core\Core\Environment::getContext()->__toString() === 'Production/Stage') {
|
if(\TYPO3\CMS\Core\Core\Environment::getContext()->__toString() === 'Production/Stage') {
|
||||||
$GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['dev'] =
|
$GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['dev'] =
|
||||||
'EXT:templates_aide/Resources/Public/Css/backend/production-stage';
|
'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'] =
|
$GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['templates_aide_default'] =
|
||||||
'EXT:templates_aide/Resources/Public/Css/backend/default';
|
'EXT:templates_aide/Resources/Public/Css/backend/default';
|
||||||
|
|
||||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerPageTSConfigFile(
|
|
||||||
'templates_aide',
|
|
||||||
'Resources/Private/PageTSConfig/default.tsconfig',
|
|
||||||
'Default Config'
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
ExtensionUtility::registerTypeConverter(Double2Converter::class);
|
ExtensionUtility::registerTypeConverter(Double2Converter::class);
|
||||||
|
|
||||||
if (TYPO3_MODE == 'BE') {
|
if (TYPO3_MODE == 'BE')
|
||||||
//$pageRenderer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
|
{
|
||||||
// \TYPO3\CMS\Core\Page\PageRenderer::class
|
|
||||||
//);
|
|
||||||
//$pageRenderer->loadRequireJsModule('TYPO3/CMS/TemplatesAide/NewContentElementWizardPreview');
|
|
||||||
|
|
||||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig(
|
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig(
|
||||||
'<INCLUDE_TYPOSCRIPT: source="FILE:EXT:templates_aide/Resources/Private/UserTSConfig/default.ts">'
|
'<INCLUDE_TYPOSCRIPT: source="FILE:EXT:templates_aide/Resources/Private/UserTSConfig/default.ts">'
|
||||||
);
|
);
|
||||||
@ -90,8 +59,17 @@ $GLOBALS['TYPO3_USER_SETTINGS']['columns']['disableDragModal'] = [
|
|||||||
'type' => 'check',
|
'type' => 'check',
|
||||||
'label' => 'LLL:EXT:templates_aide/Resources/Private/Language/locallang.xlf:disableDragModal',
|
'label' => 'LLL:EXT:templates_aide/Resources/Private/Language/locallang.xlf:disableDragModal',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
||||||
|
$GLOBALS['TYPO3_USER_SETTINGS']['showitem'] = str_replace(
|
||||||
|
'showHiddenFilesAndFolders',
|
||||||
|
'showHiddenFilesAndFolders,disableDragModal',
|
||||||
|
$GLOBALS['TYPO3_USER_SETTINGS']['showitem'],
|
||||||
|
);
|
||||||
|
} else {
|
||||||
$GLOBALS['TYPO3_USER_SETTINGS']['showitem'] = str_replace(
|
$GLOBALS['TYPO3_USER_SETTINGS']['showitem'] = str_replace(
|
||||||
'recursiveDelete',
|
'recursiveDelete',
|
||||||
'recursiveDelete,disableDragModal',
|
'recursiveDelete,disableDragModal',
|
||||||
$GLOBALS['TYPO3_USER_SETTINGS']['showitem'],
|
$GLOBALS['TYPO3_USER_SETTINGS']['showitem'],
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
@ -1,77 +0,0 @@
|
|||||||
#
|
|
||||||
# Table structure for table 'tx_templatesaide_domain_model_dummy'
|
|
||||||
#
|
|
||||||
CREATE TABLE tx_templatesaide_domain_model_dummy (
|
|
||||||
|
|
||||||
uid int(11) NOT NULL auto_increment,
|
|
||||||
pid int(11) DEFAULT '0' NOT NULL,
|
|
||||||
|
|
||||||
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
|
|
||||||
crdate int(11) unsigned DEFAULT '0' NOT NULL,
|
|
||||||
cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
|
|
||||||
deleted smallint(5) unsigned DEFAULT '0' NOT NULL,
|
|
||||||
hidden smallint(5) unsigned DEFAULT '0' NOT NULL,
|
|
||||||
starttime int(11) unsigned DEFAULT '0' NOT NULL,
|
|
||||||
endtime int(11) unsigned DEFAULT '0' NOT NULL,
|
|
||||||
|
|
||||||
t3ver_oid int(11) DEFAULT '0' NOT NULL,
|
|
||||||
t3ver_id int(11) DEFAULT '0' NOT NULL,
|
|
||||||
t3ver_wsid int(11) DEFAULT '0' NOT NULL,
|
|
||||||
t3ver_label varchar(255) DEFAULT '' NOT NULL,
|
|
||||||
t3ver_state smallint(6) DEFAULT '0' NOT NULL,
|
|
||||||
t3ver_stage int(11) DEFAULT '0' NOT NULL,
|
|
||||||
t3ver_count int(11) DEFAULT '0' NOT NULL,
|
|
||||||
t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
|
|
||||||
t3ver_move_id int(11) DEFAULT '0' NOT NULL,
|
|
||||||
|
|
||||||
sys_language_uid int(11) DEFAULT '0' NOT NULL,
|
|
||||||
l10n_parent int(11) DEFAULT '0' NOT NULL,
|
|
||||||
l10n_diffsource mediumblob,
|
|
||||||
l10n_state text,
|
|
||||||
|
|
||||||
PRIMARY KEY (uid),
|
|
||||||
KEY parent (pid),
|
|
||||||
KEY t3ver_oid (t3ver_oid,t3ver_wsid),
|
|
||||||
KEY language (l10n_parent,sys_language_uid)
|
|
||||||
|
|
||||||
);
|
|
||||||
|
|
||||||
#
|
|
||||||
# Table structure for table 'tx_templatesaide_domain_model_translation'
|
|
||||||
#
|
|
||||||
CREATE TABLE tx_templatesaide_domain_model_translation (
|
|
||||||
|
|
||||||
uid int(11) NOT NULL auto_increment,
|
|
||||||
pid int(11) DEFAULT '0' NOT NULL,
|
|
||||||
|
|
||||||
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
|
|
||||||
crdate int(11) unsigned DEFAULT '0' NOT NULL,
|
|
||||||
cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
|
|
||||||
deleted smallint(5) unsigned DEFAULT '0' NOT NULL,
|
|
||||||
hidden smallint(5) unsigned DEFAULT '0' NOT NULL,
|
|
||||||
starttime int(11) unsigned DEFAULT '0' NOT NULL,
|
|
||||||
endtime int(11) unsigned DEFAULT '0' NOT NULL,
|
|
||||||
|
|
||||||
t3ver_oid int(11) DEFAULT '0' NOT NULL,
|
|
||||||
t3ver_id int(11) DEFAULT '0' NOT NULL,
|
|
||||||
t3ver_wsid int(11) DEFAULT '0' NOT NULL,
|
|
||||||
t3ver_label varchar(255) DEFAULT '' NOT NULL,
|
|
||||||
t3ver_state smallint(6) DEFAULT '0' NOT NULL,
|
|
||||||
t3ver_stage int(11) DEFAULT '0' NOT NULL,
|
|
||||||
t3ver_count int(11) DEFAULT '0' NOT NULL,
|
|
||||||
t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
|
|
||||||
t3ver_move_id int(11) DEFAULT '0' NOT NULL,
|
|
||||||
|
|
||||||
sys_language_uid int(11) DEFAULT '0' NOT NULL,
|
|
||||||
l10n_parent int(11) DEFAULT '0' NOT NULL,
|
|
||||||
l10n_diffsource mediumblob,
|
|
||||||
l10n_state text,
|
|
||||||
|
|
||||||
PRIMARY KEY (uid),
|
|
||||||
KEY parent (pid),
|
|
||||||
KEY t3ver_oid (t3ver_oid,t3ver_wsid),
|
|
||||||
KEY language (l10n_parent,sys_language_uid)
|
|
||||||
|
|
||||||
);
|
|
||||||
|
|
||||||
## EXTENSION BUILDER DEFAULTS END TOKEN - Everything BEFORE this line is overwritten with the defaults of the extension builder
|
|
Loading…
x
Reference in New Issue
Block a user