Skip to content

Commit

Permalink
[BUGFIX] Process dot fields for new records & missing ext_emconf.php
Browse files Browse the repository at this point in the history
* override `insertDB` method in `DataHandler` to process dot fields for new records
* add missing `ext_emconf.php` to allow TER upload
  • Loading branch information
thommyhh committed Aug 13, 2024
1 parent 3d72a1b commit 8a18960
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Classes/DataHandling/DataHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ public function updateDB($table, $id, $fieldArray)
parent::updateDB($table, $id, $fieldArray);
}

public function insertDB($table, $id, $fieldArray, $newVersion = false, $suggestedUid = 0, $dontSetNewIdIndex = false)
{
$fieldArray = $this->processDotFields($table, $id, $fieldArray, 'new');

return parent::insertDB($table, $id, $fieldArray, $newVersion, $suggestedUid, $dontSetNewIdIndex);
}

protected function processDotFields($table, $id, $fieldArray, $status): array
{
if ($status !== 'new') {
Expand Down
24 changes: 24 additions & 0 deletions ext_emconf.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

declare(strict_types=1);

$EM_CONF[$_EXTKEY] = [
'title' => 'Dot Forms',
'description' => 'Create virtual fields just like flex forms, but with pure TCA.',
'version' => '1.0.1',
'category' => 'be',
'constraints' => [
'depends' => [
'typo3' => '12.4.0-12.4.99',
],
],
'state' => 'stable',
'author' => 'Thorben Nissen',
'author_email' => 'thorben@webcoast.dk',
'author_company' => 'WEBcoast',
'autoload' => [
'psr-4' => [
'Webcoast\\DotForms\\' => 'Classes',
],
],
];

0 comments on commit 8a18960

Please sign in to comment.