Skip to content

[TASK] add missing subclasses entries in Classes.php #642

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
21 changes: 0 additions & 21 deletions Classes/Service/FileGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -504,16 +504,6 @@ protected function generateTyposcriptFiles(): void
} catch (Exception $e) {
throw new Exception('Could not generate typoscript constants, error: ' . $e->getMessage());
}

// Generate Static TypoScript
try {
if ($this->extension->getDomainObjectsThatNeedMappingStatements()) {
$fileContents = $this->generateStaticTyposcript();
$this->writeFile($this->extensionDirectory . 'ext_typoscript_setup.typoscript', $fileContents);
}
} catch (Exception $e) {
throw new Exception('Could not generate static typoscript, error: ' . $e->getMessage());
}
}
}

Expand Down Expand Up @@ -1282,17 +1272,6 @@ public function generateTyposcriptConstants(): ?string
]);
}

/**
* @return string|null
* @throws Exception
*/
public function generateStaticTyposcript(): ?string
{
return $this->renderTemplate('ext_typoscript_setup.txtt', [
'extension' => $this->extension
]);
}

/**
* @param string $extensionDirectory
* @param string $classType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@

declare(strict_types=1);

return [<f:for each="{extension.domainObjectsThatNeedMappingStatements}" as="domainObject">
return [<f:for each="{extension.classHierarchy}" as="subClasses" key="parentClass">
\{parentClass}::class => [
'subclasses' => [<f:for each="{subClasses}" as="domainObject">
'{domainObject.recordType}' => \{domainObject.qualifiedClassName}::class,</f:for>
],
],</f:for><f:for each="{extension.domainObjectsThatNeedMappingStatements}" as="domainObject">
\{domainObject.qualifiedClassName}::class => [
<f:if condition="{domainObject.mapToTable}">'tableName' => '{domainObject.databaseTableName}',
</f:if><f:if condition="{domainObject.hasPropertiesWithMappingStatements}">'properties' => [<f:for each="{domainObject.propertiesThatNeedMappingStatements}" as="property">
</f:if><f:if condition="{domainObject.mapToTable}">'recordType' => '{domainObject.recordType}',</f:if><f:if condition="{domainObject.hasPropertiesWithMappingStatements}">'properties' => [<f:for each="{domainObject.propertiesThatNeedMappingStatements}" as="property">
'{property.name}' => [
'fieldName' => '{property.fieldName}'
],</f:for>
]</f:if>
],
</f:for>];
],</f:for>
];
25 changes: 0 additions & 25 deletions Resources/Private/CodeTemplates/Extbase/ext_typoscript_setup.txtt

This file was deleted.