Skip to content

Commit

Permalink
Merge branch 'development' into use-serverrequestinterface
Browse files Browse the repository at this point in the history
  • Loading branch information
NamelessCoder committed Mar 19, 2024
2 parents bd61c8e + dcf0795 commit 3c45dd8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
11 changes: 11 additions & 0 deletions Classes/Builder/ContentTypeBuilder.php
Expand Up @@ -234,6 +234,17 @@ public function registerContentType(
'CType',
$providerExtensionName
);

/** @var \Countable $fields */
$fields = $form->getFields();
if (count($fields) > 0) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
'tt_content',
'pi_flexform',
$provider->getContentObjectType(),
'after:header'
);
}
}

protected function addIcon(Form $form, string $contentType): string
Expand Down
Expand Up @@ -14,6 +14,7 @@
use FluidTYPO3\Flux\Utility\ExtensionConfigurationUtility;
use Symfony\Component\Finder\Exception\DirectoryNotFoundException;
use Symfony\Component\Finder\Finder;
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;

Expand Down Expand Up @@ -168,6 +169,9 @@ protected static function determineAbsolutePathForFilename(string $filename): st
if (strpos($filename, '://') !== false) {
return $filename;
}
return realpath($filename) ?: $filename;
if (strpos($filename, '/') === 0) {
return $filename;
}
return Environment::getPublicPath() . '/' . $filename;
}
}
4 changes: 3 additions & 1 deletion Tests/Unit/Integration/MultipleItemsProcFuncTest.php
Expand Up @@ -49,7 +49,9 @@ public function testExecutesFunctionWithItemProcessingService(): void
}
MultipleItemsProcFunc::register('table', 'field', static::class . '->dummyFunction');
$parameters = ['table' => 'table', 'field' => 'field'];
$itemProcessingServiceProvider = $this->getMockBuilder(ItemProcessingService::class)->getMockForAbstractClass();
$itemProcessingServiceProvider = $this->getMockBuilder(ItemProcessingService::class)
->disableOriginalConstructor()
->getMockForAbstractClass();
(new MultipleItemsProcFunc())->execute($parameters, $itemProcessingServiceProvider);

self::assertTrue(static::$executed);
Expand Down

0 comments on commit 3c45dd8

Please sign in to comment.