diff --git a/Classes/Command/CdnToLocal.php b/Classes/Command/CdnToLocal.php
index d3378936..16992580 100644
--- a/Classes/Command/CdnToLocal.php
+++ b/Classes/Command/CdnToLocal.php
@@ -283,7 +283,7 @@ private function getGoogleFonts($googleFonts, $gooleFontsWeights, $baseDir): voi
$googleFontsArr = explode(',', $googleFonts);
foreach ($googleFontsArr as $font) {
$fontFamily = trim($font);
- $font = str_replace(' ', '-', trim($font));
+ $font = str_replace(' ', '-', $fontFamily);
foreach (explode(',', $gooleFontsWeights) as $style) {
$style = trim($style);
$zipFilename = strtolower($font).'?download=zip&subsets=latin&variants='.$style;
@@ -310,13 +310,8 @@ private function getGoogleFonts($googleFonts, $gooleFontsWeights, $baseDir): voi
font-style: normal;
font-weight: ".$style.";
font-display: swap;
- src: url('".$basePath."Resources/Public/CSS/googlefonts/".$file.".eot');
- src: local(''),
- url('googlefonts/".$file.".eot?#iefix') format('embedded-opentype'),
- url('googlefonts/".$file.".woff2') format('woff2'),
- url('googlefonts/".$file.".woff') format('woff');
- url('googlefonts/".$file.".ttf') format('truetype'),
- url('googlefonts/".$file.".svg#".trim(str_replace(' ', '', $fontFamily))."') format('svg');
+ src: url('googlefonts/".$file.".woff2') format('woff2'),
+ url('googlefonts/".$file.".ttf') format('truetype');
}".LF.LF;
}
}
@@ -349,14 +344,12 @@ private function getGoogleFontsSitepackage($googleFonts, $gooleFontsWeights, $ba
$fontArr[$fontFamily] = self::getGoogleFiles($zipContent, $baseDir);
}
}
-
if (is_array($fontArr)) {
foreach ($fontArr as $fontFamily=>$googlePath) {
$sliceArr[$fontFamily] = array_slice($googlePath, 0, 1);
}
$css = '';
$headerData = '';
-
foreach ($sliceArr as $fontFamily=>$googlePath) {
foreach (explode(',', $gooleFontsWeights) as $i=>$style) {
$style = trim($style);
@@ -368,13 +361,8 @@ private function getGoogleFontsSitepackage($googleFonts, $gooleFontsWeights, $ba
font-style: normal;
font-weight: ".$style.";
font-display: swap;
- src: url('".$googlefontsPath.$file.".eot');
- src: local(''),
- url('".$googlefontsPath.$file.".eot?#iefix') format('embedded-opentype'),
- url('".$googlefontsPath.$file.".woff2') format('woff2'),
- url('".$googlefontsPath.$file.".woff') format('woff');
- url('".$googlefontsPath.$file.".ttf') format('truetype'),
- url('".$googlefontsPath.$file.".svg#".trim(str_replace(' ', '', $fontFamily))."') format('svg');
+ src: url('googlefonts/".$file.".woff2') format('woff2'),
+ url('googlefonts/".$file.".ttf') format('truetype');
}".LF.LF;
}
}
@@ -395,7 +383,6 @@ private function getGoogleFiles($zipContent, $baseDir='/'): array
if ($zipContent) {
$localZipPath = $baseDir.'Resources/Public/CSS/googlefonts/';
$localZipFile = $localZipPath.'googlefont.zip';
-
GeneralUtility::writeFile($localZipFile, $zipContent);
$zip = new \ZipArchive();
if ($zip->open($localZipFile) === true) {
@@ -409,9 +396,8 @@ private function getGoogleFiles($zipContent, $baseDir='/'): array
}
$googleFiles = scandir($localZipPath);
$css = '';
-
foreach ($googleFiles as $googleFile) {
- if (str_ends_with($googleFile, 'woff')) {
+ if (str_ends_with($googleFile, 'ttf')) {
$googleFileArr[] = $googleFile;
}
}
diff --git a/Classes/Command/CustomScss.php b/Classes/Command/CustomScss.php
index 553139ec..3232ecd1 100644
--- a/Classes/Command/CustomScss.php
+++ b/Classes/Command/CustomScss.php
@@ -10,6 +10,7 @@
use TYPO3\CMS\Core\Http\RequestFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Database\ConnectionPool;
+use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManager;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
@@ -101,7 +102,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
->from('pages')
->where(
$queryBuilder->expr()->eq('sys_language_uid', 0),
- $queryBuilder->expr()->eq('is_siteroot', $queryBuilder->createNamedParameter(1, \PDO::PARAM_INT))
+ $queryBuilder->expr()->eq('is_siteroot', $queryBuilder->createNamedParameter(1, Connection::PARAM_INT))
)
->executeQuery();
$siteroots = $result->fetchAllAssociative();
@@ -301,7 +302,7 @@ public function getBootstrapFilesNoZip($settings, $bootstrapVersion, $customPath
# get the Boostrap SCSS-Files
if ($bootstrapVersion > '5.1.3') {
- $scssList = '_accordion.scss, _alert.scss, _badge.scss, _breadcrumb.scss, _button-group.scss, _buttons.scss, _card.scss, _carousel.scss, _close.scss, _containers.scss, _dropdown.scss, _forms.scss, _functions.scss, _grid.scss, _helpers.scss, _images.scss, _list-group.scss, _maps.scss, _mixins.scss, _modal.scss, _nav.scss, _navbar.scss, _offcanvas.scss, _pagination.scss, _placeholders.scss, _popover.scss, _progress.scss, _reboot.scss, _root.scss, _spinners.scss, _tables.scss, _toasts.scss, _tooltip.scss, _transitions.scss, _type.scss, _utilities.scss, _variables.scss, bootstrap-grid.scss, bootstrap-reboot.scss, bootstrap-utilities.scss, bootstrap.scss';
+ $scssList = '_accordion.scss, _alert.scss, _badge.scss, _breadcrumb.scss, _button-group.scss, _buttons.scss, _card.scss, _carousel.scss, _close.scss, _containers.scss, _dropdown.scss, _forms.scss, _functions.scss, _grid.scss, _helpers.scss, _images.scss, _list-group.scss, _maps.scss, _mixins.scss, _modal.scss, _nav.scss, _navbar.scss, _offcanvas.scss, _pagination.scss, _placeholders.scss, _popover.scss, _progress.scss, _reboot.scss, _root.scss, _spinners.scss, _tables.scss, _toasts.scss, _tooltip.scss, _transitions.scss, _type.scss, _utilities.scss, _variables-dark.scss, _variables.scss, bootstrap-grid.scss, bootstrap-reboot.scss, bootstrap-utilities.scss, bootstrap.scss';
} else {
$scssList = '_accordion.scss, _alert.scss, _badge.scss, _breadcrumb.scss, _button-group.scss, _buttons.scss, _card.scss, _carousel.scss, _close.scss, _containers.scss, _dropdown.scss, _forms.scss, _functions.scss, _grid.scss, _helpers.scss, _images.scss, _list-group.scss, _mixins.scss, _modal.scss, _nav.scss, _navbar.scss, _offcanvas.scss, _pagination.scss, _placeholders.scss, _popover.scss, _progress.scss, _reboot.scss, _root.scss, _spinners.scss, _tables.scss, _toasts.scss, _tooltip.scss, _transitions.scss, _type.scss, _utilities.scss, _variables.scss, bootstrap-grid.scss, bootstrap-reboot.scss, bootstrap-utilities.scss, bootstrap.scss';
}
diff --git a/Classes/Components/Card.php b/Classes/Components/Card.php
index b9eff47f..ed45d571 100644
--- a/Classes/Components/Card.php
+++ b/Classes/Components/Card.php
@@ -5,6 +5,7 @@
namespace T3SBS\T3sbootstrap\Components;
use TYPO3\CMS\Core\Database\ConnectionPool;
+use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\SingletonInterface;
use TYPO3\CMS\Core\Service\FlexFormService;
@@ -138,7 +139,7 @@ public function getProcessedData(array $processedData, array $flexconf, array $p
->select('listitem')
->from('tx_t3sbootstrap_list_item_inline')
->where(
- $queryBuilder->expr()->eq('parentid', $queryBuilder->createNamedParameter($processedData['data']['uid'], \PDO::PARAM_INT))
+ $queryBuilder->expr()->eq('parentid', $queryBuilder->createNamedParameter($processedData['data']['uid'], Connection::PARAM_INT))
)
->executeQuery()
->fetchAllAssociative();
diff --git a/Classes/Controller/AbstractController.php b/Classes/Controller/AbstractController.php
index a8b9e6b0..43e54c78 100644
--- a/Classes/Controller/AbstractController.php
+++ b/Classes/Controller/AbstractController.php
@@ -9,6 +9,7 @@
use T3SBS\T3sbootstrap\Domain\Model\Config;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Database\ConnectionPool;
+use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
use TYPO3\CMS\Core\Site\Entity\SiteInterface;
@@ -58,7 +59,7 @@ public function initializeAction(): void
->count('uid')
->from('sys_template')
->where(
- $queryBuilder->expr()->eq('root', $queryBuilder->createNamedParameter(1, \PDO::PARAM_INT))
+ $queryBuilder->expr()->eq('root', $queryBuilder->createNamedParameter(1, Connection::PARAM_INT))
)
->executeQuery()->fetchOne();
}
@@ -84,7 +85,7 @@ protected function getCustomScss(string $file): array
->from('pages')
->where(
$queryBuilder->expr()->eq('sys_language_uid', 0),
- $queryBuilder->expr()->eq('is_siteroot', $queryBuilder->createNamedParameter(1, \PDO::PARAM_INT))
+ $queryBuilder->expr()->eq('is_siteroot', $queryBuilder->createNamedParameter(1, Connection::PARAM_INT))
)
->executeQuery();
@@ -585,7 +586,7 @@ protected function getTreeList($id, $depth, $begin = 0, $permsClause = ''): stri
$statement = $queryBuilder->select('uid')
->from('pages')
->where(
- $queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter($id, \PDO::PARAM_INT)),
+ $queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter($id, Connection::PARAM_INT)),
$queryBuilder->expr()->eq('sys_language_uid', 0),
QueryHelper::stripLogicalOperatorPrefix($permsClause)
)
diff --git a/Classes/DataProcessing/BootstrapProcessor.php b/Classes/DataProcessing/BootstrapProcessor.php
index a5a76e06..0c9362c4 100644
--- a/Classes/DataProcessing/BootstrapProcessor.php
+++ b/Classes/DataProcessing/BootstrapProcessor.php
@@ -112,6 +112,28 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu
$sectionMenuClass = $contentObjectConfiguration['settings.']['sectionMenuClass'];
}
+ if (!empty($contentObjectConfiguration['settings.']['shortcutsremove'])) {
+ $currentUid = (int) $GLOBALS['TSFE']->id;
+ $footerPid = !empty($processorConfiguration['footerPid']) ? (int) $processorConfiguration['footerPid'] : 0;
+ $removeArr = GeneralUtility::trimExplode(',', $contentObjectConfiguration['settings.']['shortcutsremove']);
+ if ($processedData['data']['pid'] !== $currentUid && $processedData['data']['pid'] !== $footerPid) {
+ // if contentByPid for collapsible_accordion or tabs_tab
+ foreach($removeArr as $remove) {
+ if (str_contains($processedData['data']['frame_class'], substr($remove,6))) {
+ $processedData['data']['frame_class'] = 'default';
+ }
+ }
+ }
+ if ($cType == 'shortcut' && !empty($parentCType)) {
+ // remove a class or any string from shortcuts if in parent ce/wrapper
+ foreach($removeArr as $remove) {
+ if (str_contains($processedData['shortcuts'], $remove)) {
+ $processedData['shortcuts'] = self::removeChar($processedData['shortcuts'], $remove);
+ }
+ }
+ }
+ }
+
// class
$classHelper = GeneralUtility::makeInstance(ClassHelper::class);
$class = $classHelper->getDefaultClass($processedData['data'], $flexconf, $extConf['cTypeClass'], $sectionMenuClass);
@@ -380,7 +402,7 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu
* @param array $animationSettingsArray
* @return string
*/
- private function generateAnimationAttributeSettingsFromAnimationsArray(array $animationSettingsArray)
+ private function generateAnimationAttributeSettingsFromAnimationsArray(array $animationSettingsArray): string
{
$animationSettings = '';
@@ -397,4 +419,21 @@ private function generateAnimationAttributeSettingsFromAnimationsArray(array $an
}
return ' '.$animationSettings;
}
+
+
+ /**
+ * @param string $s
+ * @param string $c
+ * @return string
+ */
+ function removeChar(string $s, string $c): string
+ {
+ $s = str_replace($c, '', $s);
+ if (str_contains($s, $c)) {
+ self::removeChar($s, $c);
+ }
+ return $s;
+ }
+
+
}
diff --git a/Classes/DataProcessing/ConfigProcessor.php b/Classes/DataProcessing/ConfigProcessor.php
index 4aa6a797..5e7c4ff9 100644
--- a/Classes/DataProcessing/ConfigProcessor.php
+++ b/Classes/DataProcessing/ConfigProcessor.php
@@ -9,6 +9,7 @@
use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
use TYPO3\CMS\Core\Domain\Repository\PageRepository;
use TYPO3\CMS\Core\Database\ConnectionPool;
+use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
use TYPO3\CMS\Core\Database\Query\QueryHelper;
use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
@@ -627,7 +628,7 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu
->count('uid')
->from('tt_content')
->where(
- $queryBuilder->expr()->eq('colPos', $queryBuilder->createNamedParameter(20, \PDO::PARAM_INT))
+ $queryBuilder->expr()->eq('colPos', $queryBuilder->createNamedParameter(20, Connection::PARAM_INT))
)
->executeQuery()
->fetchOne();
@@ -645,7 +646,7 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu
->count('uid')
->from('tt_content')
->where(
- $queryBuilder->expr()->eq('colPos', $queryBuilder->createNamedParameter(21, \PDO::PARAM_INT))
+ $queryBuilder->expr()->eq('colPos', $queryBuilder->createNamedParameter(21, Connection::PARAM_INT))
)
->executeQuery()
->fetchOne();
@@ -688,7 +689,7 @@ protected function getNavigationColor(int $languageUid): string
)
)
->andWhere(
- $queryBuilder->expr()->eq('sys_language_uid', $queryBuilder->createNamedParameter($languageUid, \PDO::PARAM_INT))
+ $queryBuilder->expr()->eq('sys_language_uid', $queryBuilder->createNamedParameter($languageUid, Connection::PARAM_INT))
)
->executeQuery();
@@ -752,7 +753,7 @@ protected function getTreeList(int $id, int $depth, int $begin = 0, string $perm
$statement = $queryBuilder->select('uid')
->from('pages')
->where(
- $queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter($id, \PDO::PARAM_INT)),
+ $queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter($id, Connection::PARAM_INT)),
$queryBuilder->expr()->eq('sys_language_uid', 0),
QueryHelper::stripLogicalOperatorPrefix($permsClause)
)
diff --git a/Classes/DataProcessing/GalleryProcessor.php b/Classes/DataProcessing/GalleryProcessor.php
index 4bd1e2d6..de9eb9d5 100644
--- a/Classes/DataProcessing/GalleryProcessor.php
+++ b/Classes/DataProcessing/GalleryProcessor.php
@@ -11,6 +11,7 @@
use TYPO3\CMS\Frontend\ContentObject\DataProcessorInterface;
use TYPO3\CMS\Frontend\ContentObject\Exception\ContentRenderingException;
use TYPO3\CMS\Core\Database\ConnectionPool;
+use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Service\FlexFormService;
use TYPO3\CMS\Core\Page\AssetCollector;
use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
@@ -791,7 +792,7 @@ protected function countContentRecord($uid, $table='tt_content', $equal='uid'):
->count('uid')
->from($table)
->where(
- $queryBuilder->expr()->eq($equal, $queryBuilder->createNamedParameter($uid, \PDO::PARAM_INT))
+ $queryBuilder->expr()->eq($equal, $queryBuilder->createNamedParameter($uid, Connection::PARAM_INT))
)
->executeQuery()->fetchOne();
diff --git a/Classes/DataProcessing/LastModifiedProcessor.php b/Classes/DataProcessing/LastModifiedProcessor.php
index 4c9ede7d..db807db5 100644
--- a/Classes/DataProcessing/LastModifiedProcessor.php
+++ b/Classes/DataProcessing/LastModifiedProcessor.php
@@ -8,6 +8,7 @@
use TYPO3\CMS\Frontend\ContentObject\DataProcessorInterface;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Database\ConnectionPool;
+use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Context\Context;
use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
@@ -74,8 +75,8 @@ protected function isMenuRecentlyUpdatedOnPage(): bool
->select('uid')
->from('tt_content')
->where(
- $queryBuilder->expr()->eq('sys_language_uid', $queryBuilder->createNamedParameter($sysLanguageUid, \PDO::PARAM_INT)),
- $queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter(self::getCurrentUid(), \PDO::PARAM_INT)),
+ $queryBuilder->expr()->eq('sys_language_uid', $queryBuilder->createNamedParameter($sysLanguageUid, Connection::PARAM_INT)),
+ $queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter(self::getCurrentUid(), Connection::PARAM_INT)),
$queryBuilder->expr()->eq('CType', $queryBuilder->createNamedParameter('menu_recently_updated'))
)
->executeQuery()
@@ -101,8 +102,8 @@ protected function getRecentlyUpdated($setMaxResults): array
->from('tt_content')
->orderBy('tstamp', 'DESC')
->where(
- $queryBuilder->expr()->eq('sys_language_uid', $queryBuilder->createNamedParameter($sysLanguageUid, \PDO::PARAM_INT)),
- $queryBuilder->expr()->neq('pid', $queryBuilder->createNamedParameter(self::getCurrentUid(), \PDO::PARAM_INT))
+ $queryBuilder->expr()->eq('sys_language_uid', $queryBuilder->createNamedParameter($sysLanguageUid, Connection::PARAM_INT)),
+ $queryBuilder->expr()->neq('pid', $queryBuilder->createNamedParameter(self::getCurrentUid(), Connection::PARAM_INT))
)
->setMaxResults($setMaxResults)
->executeQuery()
@@ -139,8 +140,8 @@ protected function getPageTitle($uid): string
->select('uid', 'title', 'nav_title')
->from('pages')
->where(
- $queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($uid, \PDO::PARAM_INT)),
- $queryBuilder->expr()->eq('doktype', $queryBuilder->createNamedParameter(1, \PDO::PARAM_INT))
+ $queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($uid, Connection::PARAM_INT)),
+ $queryBuilder->expr()->eq('doktype', $queryBuilder->createNamedParameter(1, Connection::PARAM_INT))
)
->executeQuery()
->fetch();
diff --git a/Classes/Helper/ClassHelper.php b/Classes/Helper/ClassHelper.php
index 23c3e091..5bbdb594 100644
--- a/Classes/Helper/ClassHelper.php
+++ b/Classes/Helper/ClassHelper.php
@@ -1,4 +1,5 @@
getPagesTSconfig();
- $layout = $data['layout'];
- $layoutAddItems = '';
- $layoutClasses = '';
- $layoutAltLabels = '';
-
- if (!empty($pagesTSconfig['TCEFORM.']['tt_content.']['layout.']['addItems.'])) {
- $layoutAddItems = $pagesTSconfig['TCEFORM.']['tt_content.']['layout.']['addItems.'];
- }
- if (!empty($pagesTSconfig['TCEFORM.']['tt_content.']['layout.']['classes.'])) {
- $layoutClasses = $pagesTSconfig['TCEFORM.']['tt_content.']['layout.']['classes.'];
- }
- if (!empty($pagesTSconfig['TCEFORM.']['tt_content.']['layout.']['altLabels.'])) {
- $layoutAltLabels = $pagesTSconfig['TCEFORM.']['tt_content.']['layout.']['altLabels.'];
- }
-
- if (isset($layoutAddItems) && isset($layoutAddItems) === $layout) {
- $class .= ' layout-'.$layout;
- } elseif (isset($layoutAltLabels) && !empty($layoutAltLabels[$layout])) {
- if (isset($layoutClasses) && $layoutClasses[$layout]) {
- $class .= ' '.strtolower($layoutClasses[$layout]);
- } else {
- $class .= ' layout-'.str_replace(' ', '-', strtolower($layoutAltLabels[$layout]));
- }
- } else {
- $class .= ' layout-'.$layout;
- }
- }
- // Frame class
- if ($data['frame_class'] != 'default') {
- $class .= ' frame-'.$data['frame_class'];
- }
-
- // Align self
- if (!empty($flexconf['responsiveVariations']) && !empty($flexconf['alignSelf'])) {
- $class .= $flexconf['alignSelf'] ? ' align-self-'.$flexconf['responsiveVariations'].'-'.$flexconf['alignSelf'] : '';
- } else {
- $class .= !empty($flexconf['alignSelf']) ? ' align-self-'.$flexconf['alignSelf'] : '';
- }
-
- //Flip Card
- if ( $data['CType'] == 't3sbs_card' && !empty($flexconf['flipcard']) ) {
- if ( $data['tx_t3sbootstrap_contextcolor'] ) {
- $data['tx_t3sbootstrap_contextcolor'] = '';
- }
- if ( $data['tx_t3sbootstrap_textcolor'] ) {
- $data['tx_t3sbootstrap_textcolor'] = '';
- }
- }
- $class .= $data['tx_t3sbootstrap_textcolor'] ? ' text-'.$data['tx_t3sbootstrap_textcolor'] : '';
- $class .= $data['tx_t3sbootstrap_contextcolor'] ? ' bg-'.$data['tx_t3sbootstrap_contextcolor'] : '';
-
- // Extra class
- $class .= $data['tx_t3sbootstrap_extra_class'] ? ' '.$data['tx_t3sbootstrap_extra_class'] : '';
- // Border
- if ( !empty($flexconf['border']) ) {
- if ( $flexconf['border'] == 'border' ) {
- $border = 'border';
- } else {
- $border = 'border '.$flexconf['border'];
- }
- if ( !empty($flexconf['borderstyle']) ) {
- $class .= ' '.$border.' border-'.$flexconf['borderstyle'];
- } else {
- $class .= ' '.$border;
- }
- $class .= !empty($flexconf['borderradius']) ? ' '.$flexconf['borderradius'] : '';
- }
-
- // Hiding / Display Elements
- $class .= !empty($flexconf['hidden']) ? ' '.$flexconf['hidden'] : '';
- // Float
- $class .= !empty($flexconf['float']) ? ' '.$flexconf['float'] : '';
- // if media
- if ($data['assets'] || $data['image'] || $data['media']) {
- $imageorient = $data['imageorient'];
- if ( $imageorient == 10 || $imageorient == 17 || $imageorient == 18 ) {
- $class .= ' clearfix';
- }
- }
-
- if ($sectionMenuClass) {
- $class .= ' section-index';
- }
-
- return ' '.trim($class);
- }
-
-
- /**
- * Returns the CSS-class for tx_container
- */
- public function getTxContainerClass(array $data, array $flexconf, bool $isVideo): string
- {
- $class = '';
-
- /**
- * Background Wrapper
- */
- if ( $data['CType'] == 'background_wrapper' && $isVideo == FALSE ) {
- $class .= !empty($flexconf['bgAttachmentFixed']) ? ' background-fixed' : '';
- if ((!$data['assets'] && !empty($flexconf['imageRaster'])) || (!empty($flexconf['origImage']) && !empty($flexconf['imageRaster']))) {
- $class .= ' bg-raster';
- }
- }
-
- /**
- * Auto-layout row/column
- */
- if ( $data['CType'] == 'autoLayout_row' ) {
- if ( !empty($flexconf['horizontalGutters']) && $flexconf['horizontalGutters'] != 'gx-4') {
- $class .= $flexconf['horizontalGutters'] ? ' '.$flexconf['horizontalGutters'] : '';
- }
- if (!empty($flexconf['verticalGutters'])) {
- if ($flexconf['verticalGutters'] == 'gy-0') $flexconf['verticalGutters'] = 0;
- $class .= !empty($flexconf['verticalGutters']) ? ' '.$flexconf['verticalGutters'] : '';
- }
- if (!empty($flexconf['responsiveVariations'])) {
- $class .= !empty($flexconf['justify']) ? ' justify-content-'.$flexconf['responsiveVariations'].'-'.$flexconf['justify'] : '';
- $class .= !empty($flexconf['alignItem']) ? ' align-items-'.$flexconf['responsiveVariations'].'-'.$flexconf['alignItem'] : '';
- } else {
- $class .= !empty($flexconf['alignItem']) ? ' align-items-'.$flexconf['alignItem'] : '';
- $class .= !empty($flexconf['justify']) ? ' justify-content-'.$flexconf['justify'] : '';
- }
- }
-
- /**
- * Container
- */
- if ( $data['CType'] == 'container' ) {
- if (!empty($flexconf['flexContainer'])) {
- if (!empty($flexconf['responsiveVariations'])) {
- $class .= !empty($flexconf['flexContainer']) ? ' d-'.$flexconf['responsiveVariations'].'-'.$flexconf['flexContainer'] : '';
- $class .= !empty($flexconf['direction']) ? ' flex-'.$flexconf['responsiveVariations'].'-'.$flexconf['direction'] : '';
- $class .= !empty($flexconf['justify']) ? ' justify-content-'.$flexconf['responsiveVariations'].'-'.$flexconf['justify'] : '';
- $class .= !empty($flexconf['alignItem']) ? ' align-items-'.$flexconf['responsiveVariations'].'-'.$flexconf['alignItem'] : '';
- $class .= !empty($flexconf['wrap']) ? ' flex-'.$flexconf['responsiveVariations'].'-'.$flexconf['wrap'] : '';
- $class .= !empty($flexconf['alignContent']) ? ' align-content-'.$flexconf['responsiveVariations'].'-'.$flexconf['alignContent'] : '';
- } else {
- $class .= !empty($flexconf['flexContainer']) ? ' d-'.$flexconf['flexContainer'] : '';
- $class .= !empty($flexconf['direction']) ? ' flex-'.$flexconf['direction'] : '';
- $class .= !empty($flexconf['justify']) ? ' justify-content-'.$flexconf['justify'] : '';
- $class .= !empty($flexconf['alignItem']) ? ' align-items-'.$flexconf['alignItem'] : '';
- $class .= !empty($flexconf['wrap']) ? ' flex-'.$flexconf['wrap'] : '';
- $class .= !empty($flexconf['alignContent']) ? ' align-content-'.$flexconf['alignContent'] : '';
- }
- }
- }
-
- return trim($class);
- }
-
-
- /**
- * Returns processedData header class
- */
- public function getHeaderClass(array $data): array
- {
- $headerPosition = $data['header_position'];
- if ( $headerPosition == 'left' ) $headerPosition = 'start';
- if ( $headerPosition == 'right' ) $headerPosition = 'end';
- $header['class'] = $headerPosition ? 'text-'.$headerPosition : '';
- $header['hClass'] = '';
- $header['hColorVar'] = '';
- $header['hLine'] = '';
-
- if ( $data['tx_t3sbootstrap_header_class'] ) {
- if (str_contains($data['tx_t3sbootstrap_header_class'], 'h-line-1')) {
- $header['hLine'] = 'h-line-1';
- }
- if (str_contains($data['tx_t3sbootstrap_header_class'], 'h-line-2')) {
- $header['hLine'] = 'h-line-2';
- }
- $textColors = explode(',','text-primary,text-secondary,text-danger,text-success,text-warning,
+ /**
+ * Returns the CSS-class for default elements
+ */
+ public function getDefaultClass(array $data, array $flexconf, string $cTypeClass, string $sectionMenuClass): string
+ {
+ // class
+ if ($cTypeClass) {
+ $class = 'fsc-default ce-'. $data['CType'];
+ } else {
+ $class = '';
+ }
+ // Spacing: padding
+ if ($data['tx_t3sbootstrap_padding_sides']) {
+ // on all 4 sides of the element
+ if ($data['tx_t3sbootstrap_padding_sides'] == 'blank') {
+ $class .= ' p-'.$data['tx_t3sbootstrap_padding_size'];
+ } else {
+ if ($data['tx_t3sbootstrap_padding_sides'] == 'l') {
+ $paddingSide = 's';
+ } elseif ($data['tx_t3sbootstrap_padding_sides'] == 'r') {
+ $paddingSide = 'e';
+ } else {
+ $paddingSide = $data['tx_t3sbootstrap_padding_sides'];
+ }
+ $class .= ' p'.$paddingSide.'-'.$data['tx_t3sbootstrap_padding_size'];
+ }
+ }
+ // Spacing: margin
+ if ($data['tx_t3sbootstrap_margin_sides']) {
+ // on all 4 sides of the element
+ if ($data['tx_t3sbootstrap_margin_sides'] == 'blank') {
+ $class .= ' m-'.$data['tx_t3sbootstrap_margin_size'];
+ } else {
+ if ($data['tx_t3sbootstrap_margin_sides'] == 'l') {
+ $marginSide = 's';
+ } elseif ($data['tx_t3sbootstrap_margin_sides'] == 'r') {
+ $marginSide = 'e';
+ } else {
+ $marginSide = $data['tx_t3sbootstrap_margin_sides'];
+ }
+ $class .= ' m'.$marginSide.'-'.$data['tx_t3sbootstrap_margin_size'];
+ }
+ }
+
+ // Layout
+ if ($data['layout']) {
+ $pagesTSconfig = self::getFrontendController()->getPagesTSconfig();
+ $layout = $data['layout'];
+ $layoutAddItems = '';
+ $layoutClasses = '';
+ $layoutAltLabels = '';
+
+ if (!empty($pagesTSconfig['TCEFORM.']['tt_content.']['layout.']['addItems.'])) {
+ $layoutAddItems = $pagesTSconfig['TCEFORM.']['tt_content.']['layout.']['addItems.'];
+ }
+ if (!empty($pagesTSconfig['TCEFORM.']['tt_content.']['layout.']['classes.'])) {
+ $layoutClasses = $pagesTSconfig['TCEFORM.']['tt_content.']['layout.']['classes.'];
+ }
+ if (!empty($pagesTSconfig['TCEFORM.']['tt_content.']['layout.']['altLabels.'])) {
+ $layoutAltLabels = $pagesTSconfig['TCEFORM.']['tt_content.']['layout.']['altLabels.'];
+ }
+
+ if (isset($layoutAddItems) && isset($layoutAddItems) === $layout) {
+ $class .= ' layout-'.$layout;
+ } elseif (isset($layoutAltLabels) && !empty($layoutAltLabels[$layout])) {
+ if (isset($layoutClasses) && $layoutClasses[$layout]) {
+ $class .= ' '.strtolower($layoutClasses[$layout]);
+ } else {
+ $class .= ' layout-'.str_replace(' ', '-', strtolower($layoutAltLabels[$layout]));
+ }
+ } else {
+ $class .= ' layout-'.$layout;
+ }
+ }
+ // Frame class
+ if ($data['frame_class'] != 'default') {
+ $class .= ' frame-'.$data['frame_class'];
+ }
+
+ // Align self
+ if (!empty($flexconf['responsiveVariations']) && !empty($flexconf['alignSelf'])) {
+ $class .= $flexconf['alignSelf'] ? ' align-self-'.$flexconf['responsiveVariations'].'-'.$flexconf['alignSelf'] : '';
+ } else {
+ $class .= !empty($flexconf['alignSelf']) ? ' align-self-'.$flexconf['alignSelf'] : '';
+ }
+
+ //Flip Card
+ if ($data['CType'] == 't3sbs_card' && !empty($flexconf['flipcard'])) {
+ if ($data['tx_t3sbootstrap_contextcolor']) {
+ $data['tx_t3sbootstrap_contextcolor'] = '';
+ }
+ if ($data['tx_t3sbootstrap_textcolor']) {
+ $data['tx_t3sbootstrap_textcolor'] = '';
+ }
+ }
+ $class .= $data['tx_t3sbootstrap_textcolor'] ? ' text-'.$data['tx_t3sbootstrap_textcolor'] : '';
+ $class .= $data['tx_t3sbootstrap_contextcolor'] ? ' bg-'.$data['tx_t3sbootstrap_contextcolor'] : '';
+
+ // Extra class
+ $class .= $data['tx_t3sbootstrap_extra_class'] ? ' '.$data['tx_t3sbootstrap_extra_class'] : '';
+ // Border
+ if (!empty($flexconf['border'])) {
+ if ($flexconf['border'] == 'border') {
+ $border = 'border';
+ } else {
+ $border = 'border '.$flexconf['border'];
+ }
+ if (!empty($flexconf['borderstyle'])) {
+ $class .= ' '.$border.' border-'.$flexconf['borderstyle'];
+ } else {
+ $class .= ' '.$border;
+ }
+ $class .= !empty($flexconf['borderradius']) ? ' '.$flexconf['borderradius'] : '';
+ }
+
+ // Hiding / Display Elements
+ $class .= !empty($flexconf['hidden']) ? ' '.$flexconf['hidden'] : '';
+ // Float
+ $class .= !empty($flexconf['float']) ? ' '.$flexconf['float'] : '';
+ // if media
+ if ($data['assets'] || $data['image'] || $data['media']) {
+ $imageorient = $data['imageorient'];
+ if ($imageorient == 10 || $imageorient == 17 || $imageorient == 18) {
+ $class .= ' clearfix';
+ }
+ }
+
+ if ($sectionMenuClass) {
+ $class .= ' section-index';
+ }
+
+ return ' '.trim($class);
+ }
+
+
+ /**
+ * Returns the CSS-class for tx_container
+ */
+ public function getTxContainerClass(array $data, array $flexconf, bool $isVideo): string
+ {
+ $class = '';
+
+ /**
+ * Background Wrapper
+ */
+ if ($data['CType'] == 'background_wrapper' && $isVideo == false) {
+ $class .= !empty($flexconf['bgAttachmentFixed']) ? ' background-fixed' : '';
+ if ((!$data['assets'] && !empty($flexconf['imageRaster'])) || (!empty($flexconf['origImage']) && !empty($flexconf['imageRaster']))) {
+ $class .= ' bg-raster';
+ }
+ }
+
+ /**
+ * Auto-layout row/column
+ */
+ if ($data['CType'] == 'autoLayout_row') {
+ if (!empty($flexconf['horizontalGutters']) && $flexconf['horizontalGutters'] != 'gx-4') {
+ $class .= $flexconf['horizontalGutters'] ? ' '.$flexconf['horizontalGutters'] : '';
+ }
+ if (!empty($flexconf['verticalGutters'])) {
+ if ($flexconf['verticalGutters'] == 'gy-0') {
+ $flexconf['verticalGutters'] = 0;
+ }
+ $class .= !empty($flexconf['verticalGutters']) ? ' '.$flexconf['verticalGutters'] : '';
+ }
+ if (!empty($flexconf['responsiveVariations'])) {
+ $class .= !empty($flexconf['justify']) ? ' justify-content-'.$flexconf['responsiveVariations'].'-'.$flexconf['justify'] : '';
+ $class .= !empty($flexconf['alignItem']) ? ' align-items-'.$flexconf['responsiveVariations'].'-'.$flexconf['alignItem'] : '';
+ } else {
+ $class .= !empty($flexconf['alignItem']) ? ' align-items-'.$flexconf['alignItem'] : '';
+ $class .= !empty($flexconf['justify']) ? ' justify-content-'.$flexconf['justify'] : '';
+ }
+ }
+
+ /**
+ * Container
+ */
+ if ($data['CType'] == 'container') {
+ if (!empty($flexconf['flexContainer'])) {
+ if (!empty($flexconf['responsiveVariations'])) {
+ $class .= !empty($flexconf['flexContainer']) ? ' d-'.$flexconf['responsiveVariations'].'-'.$flexconf['flexContainer'] : '';
+ $class .= !empty($flexconf['direction']) ? ' flex-'.$flexconf['responsiveVariations'].'-'.$flexconf['direction'] : '';
+ $class .= !empty($flexconf['justify']) ? ' justify-content-'.$flexconf['responsiveVariations'].'-'.$flexconf['justify'] : '';
+ $class .= !empty($flexconf['alignItem']) ? ' align-items-'.$flexconf['responsiveVariations'].'-'.$flexconf['alignItem'] : '';
+ $class .= !empty($flexconf['wrap']) ? ' flex-'.$flexconf['responsiveVariations'].'-'.$flexconf['wrap'] : '';
+ $class .= !empty($flexconf['alignContent']) ? ' align-content-'.$flexconf['responsiveVariations'].'-'.$flexconf['alignContent'] : '';
+ } else {
+ $class .= !empty($flexconf['flexContainer']) ? ' d-'.$flexconf['flexContainer'] : '';
+ $class .= !empty($flexconf['direction']) ? ' flex-'.$flexconf['direction'] : '';
+ $class .= !empty($flexconf['justify']) ? ' justify-content-'.$flexconf['justify'] : '';
+ $class .= !empty($flexconf['alignItem']) ? ' align-items-'.$flexconf['alignItem'] : '';
+ $class .= !empty($flexconf['wrap']) ? ' flex-'.$flexconf['wrap'] : '';
+ $class .= !empty($flexconf['alignContent']) ? ' align-content-'.$flexconf['alignContent'] : '';
+ }
+ }
+ }
+
+ return trim($class);
+ }
+
+
+ /**
+ * Returns processedData header class
+ */
+ public function getHeaderClass(array $data): array
+ {
+ $headerPosition = $data['header_position'];
+ if ($headerPosition == 'left') {
+ $headerPosition = 'start';
+ }
+ if ($headerPosition == 'right') {
+ $headerPosition = 'end';
+ }
+ $header['class'] = $headerPosition ? 'text-'.$headerPosition : '';
+ $header['hClass'] = 'mainheader';
+ $header['hColorVar'] = '';
+ $header['hLine'] = '';
+
+ if ($data['tx_t3sbootstrap_header_class']) {
+ if (str_contains($data['tx_t3sbootstrap_header_class'], 'h-line-1')) {
+ $header['hLine'] = 'h-line-1';
+ }
+ if (str_contains($data['tx_t3sbootstrap_header_class'], 'h-line-2')) {
+ $header['hLine'] = 'h-line-2';
+ }
+ $textColors = explode(',', 'text-primary,text-secondary,text-danger,text-success,text-warning,
text-info,text-light,text-dark,text-body,text-muted,text-white');
- foreach ($textColors as $textColor) {
- if (str_contains($data['tx_t3sbootstrap_header_class'], $textColor)) {
- $header['hClass'] .= $textColor;
- $header['hColorVar'] = 'var(--bs-'.substr($textColor, 5).')';
- break;
- }
- }
- }
-
- $header['class'] .= $data['tx_t3sbootstrap_header_class'] ? ' '.$data['tx_t3sbootstrap_header_class'] : '';
- $header['hClass'] .= $data['tx_t3sbootstrap_header_display'] ? ' '.$data['tx_t3sbootstrap_header_display'] : '';
-
- if ( $data['CType'] == 't3sbs_mediaobject' ) {
- $header['hClass'] .= ' mt-0';
- }
-
- if ($data['header_link'] && !$data['tx_t3sbootstrap_header_celink']) {
- $header['hLinkClass'] = trim($header['hClass']);
- $header['hClass'] = '';
- }
-
- if ( $data['tx_t3sbootstrap_header_fontawesome'] ) {
- $header['hFa'] = ' ';
- }
-
- return $header;
- }
-
-
- /**
- * Returns processedData if parent auto layout
- */
- public function getAutoLayoutClass(array $flexconf): string
- {
- $class = '';
-
- if ( !empty($flexconf['gridSystem']) ) {
- switch ( $flexconf['gridSystem'] ) {
- case 'equal':
- $class .= ' col';
- break;
- case 'column':
- $class .= !empty($flexconf['xsColumns']) ? ' col-'.$flexconf['xsColumns'] : '';
- break;
- case 'variable':
-
- if ( $flexconf['xsColumns'] == 'equal'
- || $flexconf['smColumns'] == 'equal'
- || $flexconf['mdColumns'] == 'equal'
- || $flexconf['lgColumns'] == 'equal'
- || $flexconf['xlColumns'] == 'equal' ) {
-
- $class .= !empty($flexconf['xsColumns']) ? ' col-xs' : '';
- $class .= !empty($flexconf['smColumns']) ? ' col-sm' : '';
- $class .= !empty($flexconf['mdColumns']) ? ' col-md' : '';
- $class .= !empty($flexconf['lgColumns']) ? ' col-lg' : '';
- $class .= !empty($flexconf['xlColumns']) ? ' col-xl': '';
- $class .= !empty($flexconf['xxlColumns']) ? ' col-xxl': '';
-
- } else {
-
- $class .= !empty($flexconf['xsColumns']) ? ' col-'.$flexconf['xsColumns'] : '';
- $class .= !empty($flexconf['smColumns']) ? ' col-sm-'.$flexconf['smColumns'] : '';
- $class .= !empty($flexconf['mdColumns']) ? ' col-md-'.$flexconf['mdColumns'] : '';
- $class .= !empty($flexconf['lgColumns']) ? ' col-lg-'.$flexconf['lgColumns'] : '';
- $class .= !empty($flexconf['xlColumns']) ? ' col-xl-'.$flexconf['xlColumns'] : '';
- $class .= !empty($flexconf['xxlColumns']) ? ' col-xxl-'.$flexconf['xxlColumns'] : '';
- }
- break;
- }
- }
-
- return $class;
-
- }
-
- /**
- * Returns processedData if parent container
- */
- public function getContainerClass(array $parentflexconf, array $flexconf): string
- {
- $class = '';
-
- if ( !empty($parentflexconf['flexContainer']) && !empty($parentflexconf['responsiveVariations']) ) {
- if (!empty($flexconf['responsiveVariations'])) {
- $class .= !empty($flexconf['alignSelf']) ? ' align-self-'.$flexconf['responsiveVariations'].'-'.$flexconf['flexContainer'] : '';
- } else {
- $class .= !empty($flexconf['alignSelf']) ? ' align-self-'.$flexconf['alignSelf'] : '';
- }
-
- $class .= !empty($flexconf['autoMargins']) ? ' '.$flexconf['autoMargins'].'-auto' : '';
- $class .= !empty($flexconf['order']) ? ' order-'.$flexconf['order'] : '';
- }
-
- return $class;
- }
-
-
- /**
- * Returns the frontend controller
- */
- protected function getFrontendController(): TypoScriptFrontendController
- {
- return $GLOBALS['TSFE'];
- }
-
+ foreach ($textColors as $textColor) {
+ if (str_contains($data['tx_t3sbootstrap_header_class'], $textColor)) {
+ $header['hClass'] .= ' '.$textColor;
+ $header['hColorVar'] = 'var(--bs-'.substr($textColor, 5).')';
+ break;
+ }
+ }
+ }
+
+ $header['class'] .= $data['tx_t3sbootstrap_header_class'] ? ' '.$data['tx_t3sbootstrap_header_class'] : '';
+ $header['hClass'] .= $data['tx_t3sbootstrap_header_display'] ? ' '.$data['tx_t3sbootstrap_header_display'] : '';
+
+ if ($data['CType'] == 't3sbs_mediaobject') {
+ $header['hClass'] .= ' mt-0';
+ }
+
+ if ($data['header_link'] && !$data['tx_t3sbootstrap_header_celink']) {
+ $header['hLinkClass'] = trim($header['hClass']);
+ $header['hClass'] = '';
+ }
+
+ if ($data['tx_t3sbootstrap_header_fontawesome']) {
+ $header['hFa'] = ' ';
+ }
+
+ return $header;
+ }
+
+
+ /**
+ * Returns processedData if parent auto layout
+ */
+ public function getAutoLayoutClass(array $flexconf): string
+ {
+ $class = '';
+
+ if (!empty($flexconf['gridSystem'])) {
+ switch ($flexconf['gridSystem']) {
+ case 'equal':
+ $class .= ' col';
+ break;
+ case 'column':
+ $class .= !empty($flexconf['xsColumns']) ? ' col-'.$flexconf['xsColumns'] : '';
+ break;
+ case 'variable':
+
+ if ($flexconf['xsColumns'] == 'equal'
+ || $flexconf['smColumns'] == 'equal'
+ || $flexconf['mdColumns'] == 'equal'
+ || $flexconf['lgColumns'] == 'equal'
+ || $flexconf['xlColumns'] == 'equal') {
+ $class .= !empty($flexconf['xsColumns']) ? ' col-xs' : '';
+ $class .= !empty($flexconf['smColumns']) ? ' col-sm' : '';
+ $class .= !empty($flexconf['mdColumns']) ? ' col-md' : '';
+ $class .= !empty($flexconf['lgColumns']) ? ' col-lg' : '';
+ $class .= !empty($flexconf['xlColumns']) ? ' col-xl' : '';
+ $class .= !empty($flexconf['xxlColumns']) ? ' col-xxl' : '';
+ } else {
+ $class .= !empty($flexconf['xsColumns']) ? ' col-'.$flexconf['xsColumns'] : '';
+ $class .= !empty($flexconf['smColumns']) ? ' col-sm-'.$flexconf['smColumns'] : '';
+ $class .= !empty($flexconf['mdColumns']) ? ' col-md-'.$flexconf['mdColumns'] : '';
+ $class .= !empty($flexconf['lgColumns']) ? ' col-lg-'.$flexconf['lgColumns'] : '';
+ $class .= !empty($flexconf['xlColumns']) ? ' col-xl-'.$flexconf['xlColumns'] : '';
+ $class .= !empty($flexconf['xxlColumns']) ? ' col-xxl-'.$flexconf['xxlColumns'] : '';
+ }
+ break;
+ }
+ }
+
+ return $class;
+ }
+
+ /**
+ * Returns processedData if parent container
+ */
+ public function getContainerClass(array $parentflexconf, array $flexconf): string
+ {
+ $class = '';
+
+ if (!empty($parentflexconf['flexContainer']) && !empty($parentflexconf['responsiveVariations'])) {
+ if (!empty($flexconf['responsiveVariations'])) {
+ $class .= !empty($flexconf['alignSelf']) ? ' align-self-'.$flexconf['responsiveVariations'].'-'.$flexconf['flexContainer'] : '';
+ } else {
+ $class .= !empty($flexconf['alignSelf']) ? ' align-self-'.$flexconf['alignSelf'] : '';
+ }
+
+ $class .= !empty($flexconf['autoMargins']) ? ' '.$flexconf['autoMargins'].'-auto' : '';
+ $class .= !empty($flexconf['order']) ? ' order-'.$flexconf['order'] : '';
+ }
+
+ return $class;
+ }
+
+
+ /**
+ * Returns the frontend controller
+ */
+ protected function getFrontendController(): TypoScriptFrontendController
+ {
+ return $GLOBALS['TSFE'];
+ }
}
diff --git a/Classes/Updates/BgOpacityUpgradeWizard.php b/Classes/Updates/BgOpacityUpgradeWizard.php
index 94a4701c..ae6e65a2 100644
--- a/Classes/Updates/BgOpacityUpgradeWizard.php
+++ b/Classes/Updates/BgOpacityUpgradeWizard.php
@@ -7,6 +7,7 @@
use TYPO3\CMS\Install\Attribute\UpgradeWizard;
use TYPO3\CMS\Install\Updates\UpgradeWizardInterface;
use TYPO3\CMS\Core\Database\ConnectionPool;
+use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Install\Updates\DatabaseUpdatedPrerequisite;
@@ -53,7 +54,7 @@ public function executeUpdate(): bool
$queryBuilder
->update('tt_content')
->where(
- $queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($recordId, \PDO::PARAM_INT))
+ $queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($recordId, Connection::PARAM_INT))
)
->set('tx_t3sbootstrap_bgopacity', $erg)
->executeStatement();
@@ -95,7 +96,6 @@ public function getPrerequisites(): array
return [
DatabaseUpdatedPrerequisite::class,
];
-
}
/**
diff --git a/Classes/UserFunction/TcaMatcher.php b/Classes/UserFunction/TcaMatcher.php
index 00ab4730..508f7e4f 100644
--- a/Classes/UserFunction/TcaMatcher.php
+++ b/Classes/UserFunction/TcaMatcher.php
@@ -6,6 +6,7 @@
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Database\ConnectionPool;
+use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Service\FlexFormService;
use TYPO3\CMS\Core\Resource\FileRepository;
use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
@@ -32,7 +33,7 @@ public function autoLayoutParent(array $arguments): bool
->select('*')
->from('tt_content')
->where(
- $queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($uid, \PDO::PARAM_INT))
+ $queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($uid, Connection::PARAM_INT))
)
->executeQuery();
$parent_rec = $result->fetch();
@@ -58,7 +59,7 @@ public function buttonParent(array $arguments): bool
->select('*')
->from('tt_content')
->where(
- $queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($uid, \PDO::PARAM_INT))
+ $queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($uid, Connection::PARAM_INT))
)
->executeQuery();
$parent_rec = $result->fetch();
@@ -97,7 +98,7 @@ public function cardWrapperParent(array $arguments): bool
->select('*')
->from('tt_content')
->where(
- $queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($uid, \PDO::PARAM_INT))
+ $queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($uid, Connection::PARAM_INT))
)
->executeQuery();
$parent_rec = $result->fetch();
@@ -124,7 +125,7 @@ public function twoColumnsParent(array $arguments): bool
->select('*')
->from('tt_content')
->where(
- $queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($uid, \PDO::PARAM_INT))
+ $queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($uid, Connection::PARAM_INT))
)
->executeQuery();
$parent_rec = $result->fetch();
@@ -228,7 +229,7 @@ public function flexContainerParent(array $arguments): bool
->select('*')
->from('tt_content')
->where(
- $queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($uid, \PDO::PARAM_INT))
+ $queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($uid, Connection::PARAM_INT))
)
->executeQuery();
$parent_rec = $result->fetch();
@@ -260,7 +261,7 @@ public function isButton(array $arguments): bool
->select('tx_t3sbootstrap_flexform')
->from('tt_content')
->where(
- $queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($uid, \PDO::PARAM_INT))
+ $queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($uid, Connection::PARAM_INT))
)
->executeQuery();
$parent_rec = $result->fetchAllAssociative();
@@ -450,7 +451,7 @@ public function toastContainerParent($arguments): bool
->select('*')
->from('tt_content')
->where(
- $queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($uid, \PDO::PARAM_INT))
+ $queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($uid, Connection::PARAM_INT))
)
->executeQuery();
$parent_rec = $result->fetch();
diff --git a/Classes/Wrapper/BackgroundWrapper.php b/Classes/Wrapper/BackgroundWrapper.php
index 5519debb..97e5d1b9 100644
--- a/Classes/Wrapper/BackgroundWrapper.php
+++ b/Classes/Wrapper/BackgroundWrapper.php
@@ -1,4 +1,5 @@
findByRelation('tt_content', 'assets', (int)$processedData['data']['uid']);
+ $file = !empty($files) && is_array($files) ? $files[0] : '';
+ // media
+ if ($file) {
+ // VIDEO type
+ if ($file->getType() === 4) {
+ // youtube
+ if ($file->getMimeType() === 'video/youtube' || $file->getExtension() === 'youtube') {
+ $processedData['youtube'] = true;
+ $processedData['vimeo'] = false;
+ $processedData['isVideo'] = true;
+ $processedData['contentPosition'] = !empty($flexconf['contentPosition']) ? $flexconf['contentPosition'] : 'align-self-center';
+ $processedData['ytVideo']['bgHeight'] = !empty($flexconf['bgHeight']) ? $flexconf['bgHeight'] : '';
+ $processedData['ytVideo']['ytshift'] = !empty($flexconf['ytshift']) ? $flexconf['ytshift'] : '';
+ $processedData['videoAutoPlay'] = $file->getProperties()['autoplay'];
+ $youTubeRenderer = GeneralUtility::makeInstance(YouTubeRenderer::class);
+ $processedData['videoId'] = $youTubeRenderer->render($file);
+ } else {
+ if ($file->getMimeType() === 'video/vimeo' || $file->getExtension() === 'vimeo') {
+ // vimeo video
+ $processedData['vimeo'] = true;
+ $processedData['youtube'] = false;
+ $processedData['isVideo'] = true;
+ $processedData['contentPosition'] = !empty($flexconf['contentPosition']) ? $flexconf['contentPosition'] : 'align-self-center';
+ $processedData['ytVideo']['bgHeight'] = !empty($flexconf['bgHeight']) ? $flexconf['bgHeight'] : '';
+ $processedData['ytVideo']['ytshift'] = !empty($flexconf['ytshift']) ? $flexconf['ytshift'] : '';
+ $processedData['videoAutoPlay'] = $file->getProperties()['autoplay'];
+ $youTubeRenderer = GeneralUtility::makeInstance(YouTubeRenderer::class);
+ $processedData['videoId'] = $youTubeRenderer->render($file);
+ } else {
+ // local video
+ $processedData['file'] = $file;
+ // align content items
+ $processedData['alignItem'] = $flexconf['alignVideoItem'] != 'none' ? ' '.$flexconf['alignVideoItem'] : '';
+ // video shift
+ $processedData['shift'] = $flexconf['shift'];
+ $processedData['horizontalShift'] = !empty($flexconf['horizontalShift']) ? $flexconf['horizontalShift'] : 0;
+ // overlay child
+ $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tt_content');
+ $overlayChild = $queryBuilder
+ ->count('uid')
+ ->from('tt_content')
+ ->where(
+ $queryBuilder->expr()->eq('sys_language_uid', $processedData['data']['sys_language_uid']),
+ $queryBuilder->expr()->eq('tx_container_parent', $queryBuilder->createNamedParameter($processedData['data']['uid'], Connection::PARAM_INT))
+ )
+ ->executeQuery()
+ ->fetchOne();
- /**
- * Returns the $processedData
- */
- public function getProcessedData(array $processedData, array $flexconf, string $bgMediaQueries='2560,1920,1200,992,768,576'): array
- {
- // autoheight
- $processedData['enableAutoheight'] = !empty($flexconf['enableAutoheight']) ? TRUE : FALSE;
- $processedData['addHeight'] = !empty($flexconf['addHeight']) ? (int)$flexconf['addHeight'] : 0;
- $fileRepository = GeneralUtility::makeInstance(FileRepository::class);
- $files = $fileRepository->findByRelation('tt_content', 'assets', (int)$processedData['data']['uid']);
- $file = !empty($files) && is_array($files) ? $files[0] : '';
- // media
- if ( $file ) {
- // VIDEO type
- if ( $file->getType() === 4 ) {
- // youtube
- if ( $file->getMimeType() === 'video/youtube' || $file->getExtension() === 'youtube' ) {
- $processedData['youtube'] = TRUE;
- $processedData['vimeo'] = FALSE;
- $processedData['isVideo'] = TRUE;
- $processedData['contentPosition'] = !empty($flexconf['contentPosition']) ? $flexconf['contentPosition'] : 'align-self-center';
- $processedData['ytVideo']['bgHeight'] = !empty($flexconf['bgHeight']) ? $flexconf['bgHeight'] : '';
- $processedData['ytVideo']['ytshift'] = !empty($flexconf['ytshift']) ? $flexconf['ytshift'] : '';
- $processedData['videoAutoPlay'] = $file->getProperties()['autoplay'];
- $youTubeRenderer = GeneralUtility::makeInstance(YouTubeRenderer::class);
- $processedData['videoId'] = $youTubeRenderer->render($file);
- } else {
- if ( $file->getMimeType() === 'video/vimeo' || $file->getExtension() === 'vimeo' ) {
- // vimeo video
- $processedData['vimeo'] = TRUE;
- $processedData['youtube'] = FALSE;
- $processedData['isVideo'] = TRUE;
- $processedData['contentPosition'] = !empty($flexconf['contentPosition']) ? $flexconf['contentPosition'] : 'align-self-center';
- $processedData['ytVideo']['bgHeight'] = !empty($flexconf['bgHeight']) ? $flexconf['bgHeight'] : '';
- $processedData['ytVideo']['ytshift'] = !empty($flexconf['ytshift']) ? $flexconf['ytshift'] : '';
- $processedData['videoAutoPlay'] = $file->getProperties()['autoplay'];
- $youTubeRenderer = GeneralUtility::makeInstance(YouTubeRenderer::class);
- $processedData['videoId'] = $youTubeRenderer->render($file);
- } else {
- // local video
- $processedData['file'] = $file;
- // align content items
- $processedData['alignItem'] = $flexconf['alignVideoItem'] != 'none' ? ' '.$flexconf['alignVideoItem'] :'';
- // video shift
- $processedData['shift'] = $flexconf['shift'];
- $processedData['horizontalShift'] = !empty($flexconf['horizontalShift']) ? $flexconf['horizontalShift'] : 0;
- // overlay child
- $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tt_content');
- $overlayChild = $queryBuilder
- ->count('uid')
- ->from('tt_content')
- ->where(
- $queryBuilder->expr()->eq('sys_language_uid', $processedData['data']['sys_language_uid']),
- $queryBuilder->expr()->eq('tx_container_parent', $queryBuilder->createNamedParameter($processedData['data']['uid'], \PDO::PARAM_INT))
- )
- ->executeQuery()
- ->fetchOne();
-
- $autoplay = $file->getProperties()['autoplay'];
- $loop = $flexconf['loop'];
- $mute = $autoplay ? true : $flexconf['mute'];
- $processedData['localVideo']['inlineCSS'] = '';
- $mobileHeight = $flexconf['mobileHeight'] != 'none' ? (int) trim($flexconf['mobileHeight']) :'';
- $mobileWidth = $flexconf['mobileWidth'] != 'none' ? (int) trim($flexconf['mobileWidth']) :'';
- // max-width:575px
- $processedData['localVideo']['inlineCSS'] = '@media (max-width:768px){#s-'.$processedData['data']['uid'].
- ' figure.video{width:'.$mobileWidth.'%; max-height:'.$mobileHeight.'px; margin-left:'.$processedData['horizontalShift'].'%}}';
- $ratio = end(explode('/', $flexconf['aspectRatio'])).'x9';
- $ratioArr = explode('x', $ratio);
- $x = $ratio;
- $y = $ratioArr[1].' / '.$ratioArr[0].' * 100%';
- $processedData['ratioCalcCss'] = '.ratio-'.$x.'{--bs-aspect-ratio:calc('.$y.');}';
- $processedData['localVideo']['class'] = ' ratio ratio-'.$ratio;
- $processedData['localVideo']['overlayChild'] = $overlayChild;
- $processedData['localVideo']['autoplay'] = $autoplay;
- $processedData['localVideo']['loop'] = $loop;
- $processedData['localVideo']['mute'] = $mute;
- $processedData['localVideo']['controls'] = $flexconf['localControls'] ?: 0;
- }
- }
-
- } elseif ( $file->getType() === 2 ) {
- // IMAGE
- // orig. image option in flexform
- if (!empty($flexconf['origImage'])) {
- $processedData['file'] = $file;
- $processedData['ingWidth'] = $flexconf['width'] ? $flexconf['width'] : 1296;
- } else {
- $bgImage = GeneralUtility::makeInstance(BackgroundImageUtility::class)
- ->getBgImage($processedData['data']['uid'], 'tt_content', FALSE, TRUE, $flexconf, FALSE, 0, $bgMediaQueries);
- $processedData['bgImage'] = $bgImage;
- if (!empty($flexconf['paddingTopBottom'])) {
- $processedData['style'] .= ' padding: '.$flexconf['paddingTopBottom'].'rem 0;';
- }
- }
- // align content items
- $processedData['alignItem'] = !empty($flexconf['alignItem']) ? ' '.$flexconf['alignItem'] :'';
-
- // image raster
- $processedData['imageRaster'] = !empty($flexconf['imageRaster']) ? 'multiple-' : '';
-
- // Text color - overlay (
- if ( $processedData['data']['tx_t3sbootstrap_textcolor'] ) {
- $processedData['overlayClass'] = ' text-'.$processedData['data']['tx_t3sbootstrap_textcolor'];
- }
-
- $styleHelper = GeneralUtility::makeInstance(StyleHelper::class);
- $processedData['bgColorOverlay'] = $styleHelper->getBgColor($processedData['data'], FALSE);
+ $autoplay = $file->getProperties()['autoplay'];
+ $loop = $flexconf['loop'];
+ $mute = $autoplay ? true : $flexconf['mute'];
+ $processedData['localVideo']['inlineCSS'] = '';
+ $mobileHeight = $flexconf['mobileHeight'] != 'none' ? (int) trim($flexconf['mobileHeight']) : '';
+ $mobileWidth = $flexconf['mobileWidth'] != 'none' ? (int) trim($flexconf['mobileWidth']) : '';
+ // max-width:575px
+ $processedData['localVideo']['inlineCSS'] = '@media (max-width:768px){#s-'.$processedData['data']['uid'].
+ ' figure.video{width:'.$mobileWidth.'%; max-height:'.$mobileHeight.'px; margin-left:'.$processedData['horizontalShift'].'%}}';
+ $ratio = end(explode('/', $flexconf['aspectRatio'])).'x9';
+ $ratioArr = explode('x', $ratio);
+ $x = $ratio;
+ $y = $ratioArr[1].' / '.$ratioArr[0].' * 100%';
+ $processedData['ratioCalcCss'] = '.ratio-'.$x.'{--bs-aspect-ratio:calc('.$y.');}';
+ $processedData['localVideo']['class'] = ' ratio ratio-'.$ratio;
+ $processedData['localVideo']['overlayChild'] = $overlayChild;
+ $processedData['localVideo']['autoplay'] = $autoplay;
+ $processedData['localVideo']['loop'] = $loop;
+ $processedData['localVideo']['mute'] = $mute;
+ $processedData['localVideo']['controls'] = $flexconf['localControls'] ?: 0;
+ }
+ }
+ } elseif ($file->getType() === 2) {
+ // IMAGE
+ // orig. image option in flexform
+ if (!empty($flexconf['origImage'])) {
+ $processedData['file'] = $file;
+ $processedData['ingWidth'] = $flexconf['width'] ? $flexconf['width'] : 1296;
+ } else {
+ $bgImage = GeneralUtility::makeInstance(BackgroundImageUtility::class)
+ ->getBgImage($processedData['data']['uid'], 'tt_content', false, true, $flexconf, false, 0, $bgMediaQueries);
+ $processedData['bgImage'] = $bgImage;
+ if (!empty($flexconf['paddingTopBottom'])) {
+ $processedData['style'] .= ' padding: '.$flexconf['paddingTopBottom'].'rem 0;';
+ }
+ }
+ // align content items
+ $processedData['alignItem'] = !empty($flexconf['alignItem']) ? ' '.$flexconf['alignItem'] : '';
- $filter = !empty($flexconf['imgGrayscale']) ? ' grayscale('.$flexconf['imgGrayscale'].'%) ' : '';
- $filter .= !empty($flexconf['imgSepia']) ? ' sepia('.$flexconf['imgSepia'].'%) ' : '';
- $filter .= !empty($flexconf['imgOpacity']) && $flexconf['imgOpacity'] != 100 ? ' opacity('.$flexconf['imgOpacity'].'%) ' : '';
- if ($filter)
- $processedData['style'] .= 'filter: '.trim($filter).';';
+ // image raster
+ $processedData['imageRaster'] = !empty($flexconf['imageRaster']) ? 'multiple-' : '';
- } else {
- // do nothing - audio file
- }
+ // Text color - overlay (
+ if ($processedData['data']['tx_t3sbootstrap_textcolor']) {
+ $processedData['overlayClass'] = ' text-'.$processedData['data']['tx_t3sbootstrap_textcolor'];
+ }
- } else {
- // NO file - background color only
- // Padding Top & Bottom if no media - add to style
- if (!empty($flexconf['noMediaPaddingTopBottom'])) {
- $processedData['style'] .= ' padding: '.$flexconf['noMediaPaddingTopBottom'].'rem 0;';
- }
- }
+ $styleHelper = GeneralUtility::makeInstance(StyleHelper::class);
+ $processedData['bgColorOverlay'] = $styleHelper->getBgColor($processedData['data'], false);
- $vMute = !empty($flexconf['videoMute']) ? $flexconf['videoMute'] : 0;
- $mute = !empty($processedData['videoAutoPlay']) ? 1 : $vMute;
- if (!empty($flexconf['videoControls'])) {
- $processedData['controlStyle'] = '';
- } elseif ( empty($processedData['videoAutoPlay']) ) {
- $processedData['controlStyle'] = '';
- } else {
- $processedData['controlStyle'] = ' pointer-events:none;';
- }
- if ( !empty($processedData['videoId']) && $processedData['youtube'] ) {
- $params = '?autoplay='.$processedData['videoAutoPlay'].'&loop='.$flexconf['videoLoop'].'&playlist='.
- $processedData['videoId'].'&mute='.$mute.'&rel=0&showinfo=0&controls='.$flexconf['videoControls'].'&modestbranding='.$flexconf['videoControls'];
- $processedData['youtubeParams'] = $params;
- }
- if ( !empty($processedData['videoId']) && $processedData['vimeo'] ) {
- $background = !empty($processedData['videoAutoPlay']) ? '&background=1' : '';
- $processedData['vimeoParams'] = $background.'&autoplay='.$processedData['videoAutoPlay'].'&loop='.$flexconf['videoLoop'].'&mute='.$mute;
- $processedData['startButton'] = $processedData['videoAutoPlay'] ? 0 : 1;
- }
+ $filter = !empty($flexconf['imgGrayscale']) ? ' grayscale('.$flexconf['imgGrayscale'].'%) ' : '';
+ $filter .= !empty($flexconf['imgSepia']) ? ' sepia('.$flexconf['imgSepia'].'%) ' : '';
+ $filter .= !empty($flexconf['imgOpacity']) && $flexconf['imgOpacity'] != 100 ? ' opacity('.$flexconf['imgOpacity'].'%) ' : '';
+ if ($filter) {
+ $processedData['style'] .= 'filter: '.trim($filter).';';
+ }
+ } else {
+ // do nothing - audio file
+ }
+ } else {
+ // NO file - background color only
+ // Padding Top & Bottom if no media - add to style
+ if (!empty($flexconf['noMediaPaddingTopBottom'])) {
+ $processedData['style'] .= ' padding: '.$flexconf['noMediaPaddingTopBottom'].'rem 0;';
+ }
+ }
- return $processedData;
- }
+ $vMute = !empty($flexconf['videoMute']) ? $flexconf['videoMute'] : 0;
+ $mute = !empty($processedData['videoAutoPlay']) ? 1 : $vMute;
+ if (!empty($flexconf['videoControls'])) {
+ $processedData['controlStyle'] = '';
+ } elseif (empty($processedData['videoAutoPlay'])) {
+ $processedData['controlStyle'] = '';
+ } else {
+ $processedData['controlStyle'] = ' pointer-events:none;';
+ }
+ if (!empty($processedData['videoId']) && $processedData['youtube']) {
+ $params = '?autoplay='.$processedData['videoAutoPlay'].'&loop='.$flexconf['videoLoop'].'&playlist='.
+ $processedData['videoId'].'&mute='.$mute.'&rel=0&showinfo=0&controls='.$flexconf['videoControls'].'&modestbranding='.$flexconf['videoControls'];
+ $processedData['youtubeParams'] = $params;
+ }
+ if (!empty($processedData['videoId']) && $processedData['vimeo']) {
+ $background = !empty($processedData['videoAutoPlay']) ? '&background=1' : '';
+ $processedData['vimeoParams'] = $background.'&autoplay='.$processedData['videoAutoPlay'].'&loop='.$flexconf['videoLoop'].'&mute='.$mute;
+ $processedData['startButton'] = $processedData['videoAutoPlay'] ? 0 : 1;
+ }
+ return $processedData;
+ }
}
diff --git a/Classes/Wrapper/CardWrapper.php b/Classes/Wrapper/CardWrapper.php
index 880465c9..e00e7120 100644
--- a/Classes/Wrapper/CardWrapper.php
+++ b/Classes/Wrapper/CardWrapper.php
@@ -8,6 +8,7 @@
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Service\FlexFormService;
use TYPO3\CMS\Core\Database\ConnectionPool;
+use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Database\Query\Restriction\FrontendRestrictionContainer;
use TYPO3\CMS\Core\Resource\FileRepository;
@@ -33,8 +34,8 @@ public function getProcessedData(array $processedData, array $flexconf): array
->select('*')
->from('tt_content')
->where(
- $queryBuilder->expr()->eq('tx_container_parent', $queryBuilder->createNamedParameter($processedData['data']['uid'], \PDO::PARAM_INT)),
- $queryBuilder->expr()->eq('sys_language_uid', $queryBuilder->createNamedParameter($processedData['data']['sys_language_uid'], \PDO::PARAM_INT))
+ $queryBuilder->expr()->eq('tx_container_parent', $queryBuilder->createNamedParameter($processedData['data']['uid'], Connection::PARAM_INT)),
+ $queryBuilder->expr()->eq('sys_language_uid', $queryBuilder->createNamedParameter($processedData['data']['sys_language_uid'], Connection::PARAM_INT))
)
->orderBy('sorting')
->executeQuery()
diff --git a/Classes/Wrapper/CarouselContainer.php b/Classes/Wrapper/CarouselContainer.php
index e2612357..06f30999 100644
--- a/Classes/Wrapper/CarouselContainer.php
+++ b/Classes/Wrapper/CarouselContainer.php
@@ -8,6 +8,7 @@
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Resource\FileRepository;
use TYPO3\CMS\Core\Database\ConnectionPool;
+use TYPO3\CMS\Core\Database\Connection;
/*
* This file is part of the TYPO3 extension t3sbootstrap.
@@ -36,7 +37,7 @@ public function getProcessedData(array $processedData, array $flexconf): array
->select('uid')
->from('tt_content')
->where(
- $queryBuilder->expr()->eq('tx_container_parent', $queryBuilder->createNamedParameter($processedData['data']['uid'], \PDO::PARAM_INT))
+ $queryBuilder->expr()->eq('tx_container_parent', $queryBuilder->createNamedParameter($processedData['data']['uid'], Connection::PARAM_INT))
)
->executeQuery()
->fetchAllAssociative();
diff --git a/Classes/Wrapper/CollapsibleAccordion.php b/Classes/Wrapper/CollapsibleAccordion.php
index c1f2b3b3..abe3ccba 100644
--- a/Classes/Wrapper/CollapsibleAccordion.php
+++ b/Classes/Wrapper/CollapsibleAccordion.php
@@ -35,7 +35,6 @@ public function getProcessedData(array $processedData, array $flexconf, array $p
$processedData['buttonstyle'] = !empty($flexconf['style']) ? $flexconf['style'] : 'primary';
$processedData['collapsibleByPid'] = !empty($flexconf['collapsibleByPid']) ? $flexconf['collapsibleByPid'] : '';
$processedData['media'] = $file ? $file : '';
-
$processedData['appearance'] = $parentflexconf['appearance'];
return $processedData;
diff --git a/Classes/Wrapper/CollapsibleContainer.php b/Classes/Wrapper/CollapsibleContainer.php
index 27a65684..fb5134ea 100644
--- a/Classes/Wrapper/CollapsibleContainer.php
+++ b/Classes/Wrapper/CollapsibleContainer.php
@@ -8,6 +8,7 @@
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Resource\FileRepository;
use TYPO3\CMS\Core\Database\ConnectionPool;
+use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Service\FlexFormService;
/*
@@ -33,7 +34,7 @@ public function getProcessedData(array $processedData, array $flexconf): array
->select('tx_t3sbootstrap_flexform', 'tx_t3sbootstrap_header_fontawesome', 'tx_t3sbootstrap_header_class')
->from('tt_content')
->where(
- $queryBuilder->expr()->eq('tx_container_parent', $queryBuilder->createNamedParameter($processedData['data']['uid'], \PDO::PARAM_INT))
+ $queryBuilder->expr()->eq('tx_container_parent', $queryBuilder->createNamedParameter($processedData['data']['uid'], Connection::PARAM_INT))
)
->executeQuery()
->fetchAllAssociative();
diff --git a/Classes/Wrapper/SwiperContainer.php b/Classes/Wrapper/SwiperContainer.php
index 36599079..b808537a 100644
--- a/Classes/Wrapper/SwiperContainer.php
+++ b/Classes/Wrapper/SwiperContainer.php
@@ -8,6 +8,7 @@
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Resource\FileRepository;
use TYPO3\CMS\Core\Database\ConnectionPool;
+use TYPO3\CMS\Core\Database\Connection;
/*
* This file is part of the TYPO3 extension t3sbootstrap.
@@ -55,7 +56,7 @@ public function getProcessedData(array $processedData, array $flexconf): array
->select('uid')
->from('tt_content')
->where(
- $queryBuilder->expr()->eq('tx_container_parent', $queryBuilder->createNamedParameter($processedData['data']['uid'], \PDO::PARAM_INT))
+ $queryBuilder->expr()->eq('tx_container_parent', $queryBuilder->createNamedParameter($processedData['data']['uid'], Connection::PARAM_INT))
)
->executeQuery()
->fetchAllAssociative();
diff --git a/Configuration/RTE/Default.yaml b/Configuration/RTE/Default.yaml
index 9eedb9ca..272a8e23 100644
--- a/Configuration/RTE/Default.yaml
+++ b/Configuration/RTE/Default.yaml
@@ -4,13 +4,23 @@ imports:
- { resource: 'EXT:rte_ckeditor/Configuration/RTE/Editor/Base.yaml' }
- { resource: 'EXT:rte_ckeditor/Configuration/RTE/Editor/Plugins.yaml' }
-
# Add configuration for the editor
# For complete documentation see https://ckeditor.com/docs/ckeditor5/latest/features/index.html
editor:
config:
-
+
+ importModules:
+ - { 'module': '@ckeditor/ckeditor5-font', 'exports': [ 'Font' ] }
+ - { 'module': '@ckeditor/ckeditor5-indent', 'exports': [ 'IndentBlock' ] }
+ - { 'module': '@ckeditor/ckeditor5-show-blocks', 'exports': ['ShowBlocks'] }
+ - { 'module': '@ckeditor/ckeditor5-word-count', 'exports': ['WordCount'] }
+
+ extraPlugins:
+ - Font
+ - Indent
+ - IndentBlock
+
contentsCss:
- 'EXT:t3sbootstrap/Resources/Public/Backend/RTE/t3sbootstrap.css'
@@ -37,17 +47,50 @@ editor:
- undo
- redo
- '|'
+ - showBlocks
- horizontalLine
- sourceEditing
- '-'
- style
+ - '|'
- heading
- '|'
+ - { label: 'Font', icon: false, items: [ 'fontFamily', 'fontSize', 'fontColor', 'fontBackgroundColor' ] }
+ - '|'
- alignment
- findAndReplace
- - insertTable
- specialCharacters
-
+ - '|'
+ - outdent
+ - indent
+
+ indentBlock:
+ classes:
+ - 'custom-block-indent-a'
+ - 'custom-block-indent-b'
+ - 'custom-block-indent-c'
+
+ fontColor:
+ colors:
+ - { label: 'Primary', color: 'var(--bs-primary)' }
+ - { label: 'Secondary', color: 'var(--bs-secondary)' }
+ - { label: 'Success', color: 'var(--bs-success)' }
+ - { label: 'Danger', color: 'var(--bs-danger)' }
+ - { label: 'Warning', color: 'var(--bs-warning)' }
+ - { label: 'Info', color: 'var(--bs-info)' }
+ - { label: 'Light', color: 'var(--bs-light)' }
+ - { label: 'Dark', color: 'var(--bs-dark)' }
+
+ fontBackgroundColor:
+ colors:
+ - { label: 'Primary', color: 'var(--bs-primary)' }
+ - { label: 'Secondary', color: 'var(--bs-secondary)' }
+ - { label: 'Success', color: 'var(--bs-success)' }
+ - { label: 'Danger', color: 'var(--bs-danger)' }
+ - { label: 'Warning', color: 'var(--bs-warning)' }
+ - { label: 'Info', color: 'var(--bs-info)' }
+ - { label: 'Light', color: 'var(--bs-light)' }
+ - { label: 'Dark', color: 'var(--bs-dark)' }
heading:
options:
@@ -59,7 +102,6 @@ editor:
- { model: 'heading6', view: 'h6', title: 'Heading 6' }
- { model: 'formatted', view: 'pre', title: 'Pre-Formatted Text' }
-
style:
definitions:
# Blockstile
@@ -75,24 +117,20 @@ editor:
- { name: 'Uppercase', element: 'p', 'classes': ['text-uppercase'], isBlock: 'true' }
- { name: 'Capitalize', element: 'p', 'classes': ['text-capitalize'], isBlock: 'true' }
-
- # Blockstile - Alert (div)
- # - { name: 'Alert Primary', element: 'div', 'classes': ['alert', 'alert-primary'], isBlock: 'true' }
- # - { name: 'Alert Secondary', element: 'div', classes': ['alert', 'alert-secondary'], isBlock: 'true' }
- # - { name: 'Alert Success', element: 'div', 'classes': ['alert', 'alert-success'], isBlock: 'true' }
- # - { name: 'Alert Danger', element: 'div', 'classes': ['alert', 'alert-danger'], isBlock: 'true' }
- # - { name: 'Alert Warning', element: 'div', 'classes': ['alert', 'alert-warning'], isBlock: 'true' }
- # - { name: 'Alert Info', element: 'div', 'classes': ['alert', 'alert-info'], isBlock: 'true' }
- # - { name: 'Alert Light', element: 'div', 'classes': ['alert', 'alert-light'], isBlock: 'true' }
- # - { name: 'Alert Dark', element: 'div', 'classes': ['alert', 'alert-dark'], isBlock: 'true' }
+ - { name: 'Alert Primary', element: 'p', 'classes': ['alert', 'alert-primary'], isBlock: 'true' }
+ - { name: 'Alert Secondary', element: 'p', classes': ['alert', 'alert-secondary'], isBlock: 'true' }
+ - { name: 'Alert Success', element: 'p', 'classes': ['alert', 'alert-success'], isBlock: 'true' }
+ - { name: 'Alert Danger', element: 'p', 'classes': ['alert', 'alert-danger'], isBlock: 'true' }
+ - { name: 'Alert Warning', element: 'p', 'classes': ['alert', 'alert-warning'], isBlock: 'true' }
+ - { name: 'Alert Info', element: 'p', 'classes': ['alert', 'alert-info'], isBlock: 'true' }
+ - { name: 'Alert Light', element: 'p', 'classes': ['alert', 'alert-light'], isBlock: 'true' }
+ - { name: 'Alert Dark', element: 'p', 'classes': ['alert', 'alert-dark'], isBlock: 'true' }
# Textstile
- { name: 'Mark', element: 'span', classes: ['mark'] }
-
- { name: 'Del', element: 'del', classes: ['del'] }
- { name: 'Ins', element: 'ins', classes: ['ins'] }
- { name: 'Code', element: 'code', classes: [''] }
-
- { name: 'Lead', element: 'span', classes: ['lead'] }
- { name: 'Small', element: 'span', classes: ['small'] }
- { name: 'Color primary', element: 'span', classes: ['text-primary'] }
@@ -105,51 +143,50 @@ editor:
- { name: 'Uppercase ', element: 'span', 'classes': ['text-uppercase'] }
- { name: 'Capitalize ', element: 'span', 'classes': ['text-capitalize'] }
-
# Textstile - Buttons
- - { name: 'Button Primary', element: 'a', 'classes': ['btn btn-primary'] }
- - { name: 'Button Secondary', element: 'a', 'classes': ['btn btn-secondary'] }
- - { name: 'Button Success', element: 'a', 'classes': ['btn btn-success'] }
- - { name: 'Button Danger', element: 'a', 'classes': ['btn btn-danger'] }
- - { name: 'Button Warning', element: 'a', 'classes': ['btn btn-warning'] }
- - { name: 'Button Info', element: 'a', 'classes': ['btn btn-info'] }
- - { name: 'Button Light', element: 'a', 'classes': ['btn btn-light'] }
- - { name: 'Button Dark', element: 'a', 'classes': ['btn btn-dark'] }
-
+ - { name: 'Button Primary', element: 'a', 'classes': ['btn btn-primary'] }
+ - { name: 'Button Secondary', element: 'a', 'classes': ['btn btn-secondary'] }
+ - { name: 'Button Success', element: 'a', 'classes': ['btn btn-success'] }
+ - { name: 'Button Danger', element: 'a', 'classes': ['btn btn-danger'] }
+ - { name: 'Button Warning', element: 'a', 'classes': ['btn btn-warning'] }
+ - { name: 'Button Info', element: 'a', 'classes': ['btn btn-info'] }
+ - { name: 'Button Light', element: 'a', 'classes': ['btn btn-light'] }
+ - { name: 'Button Dark', element: 'a', 'classes': ['btn btn-dark'] }
# Textstile - Badges
- - { name: 'Badge Primary', element: 'span', 'classes': ['badge', 'text-bg-primary'] }
- - { name: 'Badge Secondary', element: 'span', 'classes': ['badge text-bg-secondary'] }
- - { name: 'Badge Success', element: 'span', 'classes': ['badge text-bg-success'] }
- - { name: 'Badge Danger', element: 'span', 'classes': ['badge text-bg-danger'] }
- - { name: 'Badge Warning', element: 'span', 'classes': ['badge text-bg-warning'] }
- - { name: 'Badge Info', element: 'span', 'classes': ['badge text-bg-info'] }
- - { name: 'Badge Light', element: 'span', 'classes': ['badge text-bg-light'] }
- - { name: 'Badge Dark', element: 'span', 'classes': ['badge text-bg-dark'] }
-
+ - { name: 'Badge Primary', element: 'span', 'classes': ['badge', 'text-bg-primary'] }
+ - { name: 'Badge Secondary', element: 'span', 'classes': ['badge text-bg-secondary'] }
+ - { name: 'Badge Success', element: 'span', 'classes': ['badge text-bg-success'] }
+ - { name: 'Badge Danger', element: 'span', 'classes': ['badge text-bg-danger'] }
+ - { name: 'Badge Warning', element: 'span', 'classes': ['badge text-bg-warning'] }
+ - { name: 'Badge Info', element: 'span', 'classes': ['badge text-bg-info'] }
+ - { name: 'Badge Light', element: 'span', 'classes': ['badge text-bg-light'] }
+ - { name: 'Badge Dark', element: 'span', 'classes': ['badge text-bg-dark'] }
+
# Textstile - Pill badges
- - { name: 'Pill Badge Primary', element: 'span', 'classes': ['badge rounded-pill text-bg-primary'] }
- - { name: 'Pill Badge Secondary', element: 'span', 'classes': ['badge rounded-pill text-bg-secondary'] }
- - { name: 'Pill Badge Success', element: 'span', 'classes': ['badge rounded-pill text-bg-success'] }
- - { name: 'Pill Badge Danger', element: 'span', 'classes': ['badge rounded-pill text-bg-danger'] }
- - { name: 'Pill Badge Warning', element: 'span', 'classes': ['badge rounded-pill text-bg-warning'] }
- - { name: 'Pill Badge Info', element: 'span', 'classes': ['badge rounded-pill text-bg-info'] }
- - { name: 'Pill Badge Light', element: 'span', 'classes': ['badge rounded-pill text-bg-light'] }
+ - { name: 'Pill Badge Primary', element: 'span', 'classes': ['badge rounded-pill text-bg-primary'] }
+ - { name: 'Pill Badge Secondary', element: 'span', 'classes': ['badge rounded-pill text-bg-secondary'] }
+ - { name: 'Pill Badge Success', element: 'span', 'classes': ['badge rounded-pill text-bg-success'] }
+ - { name: 'Pill Badge Danger', element: 'span', 'classes': ['badge rounded-pill text-bg-danger'] }
+ - { name: 'Pill Badge Warning', element: 'span', 'classes': ['badge rounded-pill text-bg-warning'] }
+ - { name: 'Pill Badge Info', element: 'span', 'classes': ['badge rounded-pill text-bg-info'] }
+ - { name: 'Pill Badge Light', element: 'span', 'classes': ['badge rounded-pill text-bg-light'] }
- { name: 'Pill Badge Dark', element: 'span', 'classes': ['badge rounded-pill text-bg-dark'] }
alignment:
options:
- - { name: 'left', className: 'text-left' }
+ - { name: 'left', className: 'text-start' }
- { name: 'center', className: 'text-center' }
- - { name: 'right', className: 'text-right' }
+ - { name: 'right', className: 'text-end' }
- { name: 'justify', className: 'text-justify' }
- table:
- defaultHeadings: { rows: 1 }
- contentToolbar:
- - tableColumn
- - tableRow
- - mergeTableCells
- - tableProperties
- - tableCellProperties
+ htmlSupport:
+ allowEmpty:
+ - 'div'
+
+ allow:
+ - name: 'div'
+ attributes: true
+ classes: true
+ styles: true
diff --git a/Configuration/TSConfig/Content.tsconfig b/Configuration/TSConfig/Content.tsconfig
index 01a656f8..68d0e1c9 100644
--- a/Configuration/TSConfig/Content.tsconfig
+++ b/Configuration/TSConfig/Content.tsconfig
@@ -48,7 +48,7 @@ TCEFORM.tt_content {
}
frame_class {
types {
- collapsible_accordion.disabled = 1
+# collapsible_accordion.disabled = 1
t3sbs_toast.disabled = 1
}
}
diff --git a/Configuration/TypoScript/Lib/ContentElement.typoscript b/Configuration/TypoScript/Lib/ContentElement.typoscript
index 40afdd31..b9f1408f 100644
--- a/Configuration/TypoScript/Lib/ContentElement.typoscript
+++ b/Configuration/TypoScript/Lib/ContentElement.typoscript
@@ -94,6 +94,7 @@ lib.contentElement {
t3sbconcatenate = {$bootstrap.extconf.t3sbconcatenate}
sectionMenuClass = {$bootstrap.config.sectionMenuClass}
sitepackage = {$bootstrap.extconf.sitepackage}
+ shortcutsremove = {$bootstrap.shortcutsremove}
config {
sectionmenuAnchorOffset = {$bootstrap.config.sectionmenuAnchorOffset}
sectionmenuScrollspyRootMargin = {$bootstrap.config.sectionmenuScrollspyRootMargin}
@@ -126,6 +127,7 @@ lib.contentElement {
contentMarginTop = {$bootstrap.config.contentMarginTop}
configuid = {$bootstrap.config.uid}
disableAutoRow = {$bootstrap.image.disableAutoRow}
+ footerPid = {$bootstrap.config.footerPid}
breakpoint {
sm = {$bootstrap.navbar.breakpoint.sm}
md = {$bootstrap.navbar.breakpoint.md}
diff --git a/Configuration/TypoScript/Page/Template.typoscript b/Configuration/TypoScript/Page/Template.typoscript
index feb1fd98..278ae140 100644
--- a/Configuration/TypoScript/Page/Template.typoscript
+++ b/Configuration/TypoScript/Page/Template.typoscript
@@ -36,6 +36,7 @@ page {
fontawesome.fontawesomeCss = {$bootstrap.extconf.fontawesomeCss}
fontawesome.faLinkIcons = {$bootstrap.config.faLinkIcons}
+ skiplinks = {$bootstrap.skiplinks}
disableDefaultCss = {$bootstrap.config.disableDefaultCss}
lazyLoad = {$bootstrap.extconf.lazyLoad}
lazyLoadThreshold = {$bootstrap.image.lazyLoadThreshold}
diff --git a/Configuration/TypoScript/constants.typoscript b/Configuration/TypoScript/constants.typoscript
index 2b00f75e..c77bb3ae 100644
--- a/Configuration/TypoScript/constants.typoscript
+++ b/Configuration/TypoScript/constants.typoscript
@@ -15,7 +15,7 @@ plugin.tx_t3sbootstrap {
}
-bootstrap.cdn.bootstraplatest = 5.3.2
+bootstrap.cdn.bootstraplatest = 5.3.3
bootstrap.cdn.noZip = 0
bootstrap.cdn.fontawesome6latest = 6.5.1
@@ -52,7 +52,7 @@ bootstrap.cdn {
# cat=bootstrap-cdn/a-google/10; type=small; label=Comma separated list with google fonts:integrate Google Fonts "GDPR"-compliant locally into your website (e.g.: Montserrat,Fira Sans)
googlefonts =
# cat=bootstrap-cdn/b-version/10; type=small; label=Bootstrap:
- bootstrap = 5.3.2
+ bootstrap = 5.3.3
# cat=bootstrap-cdn/b-version/11; type=small; label=Popper js:
popperjs = 2.11.8
# cat=bootstrap-cdn/b-version/13; type=small; label=Masonry js:
@@ -81,11 +81,11 @@ bootstrap.cdn {
swiper = 11
# cat=bootstrap-cdn/c-integrity/10; type=small; label=Bootstrap CSS:
- bootstrapCssIntegrity = sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN
+ bootstrapCssIntegrity = sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH
# cat=bootstrap-cdn/c-integrity/11; type=small; label=Bootstrap JS:
- bootstrapJsIntegrity = sha384-BBtl+eGJRgqQAUMxJ7pMwbEyER4l1g+O15P+16Ep7Q9Q+zqX6gSbd85u4mG4QzX+
+ bootstrapJsIntegrity = sha384-0pUGZvbkm6XF6gxjEnlmuGrJXVbNuzT9qBBavbLwCsOGabYfZo0T0to5eqruptLy
# cat=bootstrap-cdn/c-integrity/12; type=small; label=Bootstrap Bundle JS:
- bootstrapBundleJsIntegrity = sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL
+ bootstrapBundleJsIntegrity = sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz
# cat=bootstrap-cdn/c-integrity/13; type=small; label=Popper js:
popperjsIntegrity = sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r
# cat=bootstrap-cdn/c-integrity/14; type=small; label=Masonry js:
@@ -300,6 +300,12 @@ bootstrap.navbar {
floatDropdownIconRight = 0
}
+# creating "Skip Links" to navigation, content or footer for barrier-free accessibility if activated (in Main.html)
+bootstrap.skiplinks = 0
+
+# remove any string (e.g. a class name) from shortcuts if in parent CE/wrapper
+bootstrap.shortcutsremove =
+
# style one for the submenu (0 = default)
bootstrap.submenu.styleOne = 0
@@ -327,14 +333,14 @@ styles.content.textmedia.borderWidth =
styles.content.textmedia.borderPadding =
# pages override - deprecated
-pages.override {
- # 1,2,3,4 or 6 (only)
- smallColumns =
- # sm,md,lg or xl (only)
- breakpoint =
- # boolean
- dropdownRight =
-}
+#pages.override {
+# # 1,2,3,4 or 6 (only)
+# smallColumns =
+# # sm,md,lg or xl (only)
+# breakpoint =
+# # boolean
+# dropdownRight =
+#}
[loaded('felogin')]
diff --git a/Resources/Private/Partials/Content/Media/Type/Image.html b/Resources/Private/Partials/Content/Media/Type/Image.html
index 260d179d..7bc44cd3 100644
--- a/Resources/Private/Partials/Content/Media/Type/Image.html
+++ b/Resources/Private/Partials/Content/Media/Type/Image.html
@@ -55,7 +55,7 @@