Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ff/v12 #78

Merged
merged 6 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Classes/Command/CreateNeededCroppings.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ protected function getForeignTableName(array $fieldConfig): ?string
// todo: Implement inline with MM
return null;
}
if ($fieldConfig['type'] === 'inline') {
if ($fieldConfig['type'] === 'inline' || $fieldConfig['type'] === 'file') {
return $fieldConfig['foreign_table'];
}
if ($fieldConfig['type'] === 'select') {
Expand All @@ -241,7 +241,7 @@ protected function queryForeignUids(string $localTableName, string $foreignTable
// todo: Implement inline with MM
return [];
}
if ($fieldConfig['type'] === 'inline') {
if ($fieldConfig['type'] === 'inline' || $fieldConfig['type'] === 'file') {
$queryBuilder
->select($foreignTableName . '.uid')
->from($foreignTableName);
Expand Down
12 changes: 9 additions & 3 deletions Classes/ViewHelpers/ResponsivePictureViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use TYPO3\CMS\Core\Resource\FileReference;
use TYPO3\CMS\Core\Resource\ProcessedFile;
use TYPO3\CMS\Core\Resource\ResourceFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Domain\Model\FileReference as ExtbaseFileReferenceModel;
use TYPO3\CMS\Extbase\Service\ImageService;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper;
Expand Down Expand Up @@ -92,7 +93,8 @@ public function render(): string
$this->getImageUri($fileReference),
(string)$fileReference->getAlternative(),
(string)$fileReference->getTitle(),
$this->arguments['additionalImageAttributes']
$this->arguments['additionalImageAttributes'],
$this->arguments['absolute']
);
} else {
// auto render
Expand All @@ -113,16 +115,20 @@ public function render(): string
$variantData['fallbackImage']['src'],
(string)$fileReference->getAlternative(),
(string)$fileReference->getTitle(),
$additionalAttributes
$additionalAttributes,
$this->arguments['absolute']
);
}

$this->tag->setContent($tagContent);
return $this->tag->render();
}

protected function renderImageTag(string $src, string $alternative = '', string $title = null, array $additionalAttributes = []): string
protected function renderImageTag(string $src, string $alternative = '', string $title = null, array $additionalAttributes = [], bool $absolute = false): string
{
if ($absolute) {
$src = GeneralUtility::locationHeaderUrl($src);
}
$tag = new TagBuilder('img');
$tag->addAttribute('src', $src);
$tag->addAttribute('alt', $alternative);
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"require": {
"php": ">=7.4.0",
"typo3/cms-core": "^10.4.12 || ^11.5"
"typo3/cms-core": "^11.5 || ^12.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.12"
Expand Down
4 changes: 2 additions & 2 deletions ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
'version' => '3.4.0',
'constraints' => [
'depends' => [
'typo3' => '10.4.0-11.5.99',
'php' => '7.0.0-8.2.99',
'typo3' => '11.5.0-12.4.99',
'php' => '7.4.0-8.2.99',
],
],
];
2 changes: 0 additions & 2 deletions ext_localconf.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

defined('TYPO3_MODE') || die();

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['melonImagesMigrateSchedulerTask'] = \Smichaelsen\MelonImages\Updates\MigrateSchedulerTask::class;

$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['melon_images'] = [
Expand Down