[TYPO3-dev] EXTBASE :: Domain model inheritance for entities

Steffen Wickham steffen at gaming-inc.de
Wed Aug 14 11:56:05 CEST 2013


Hi everybody,

I'm starting to develop a new extension for TYPO3 CMS 6.1 and want to
use extbase for the first time. I'm very familiar with pi_base extension
development and using TYPO3 Flow for a long time and know even advanced
parts. But I think thats the problem at the moment....

What is my goal? I'm trying to develop an extension which can be
described best as a "quiz management". A BE user should be able to
create/edit/delete a "quiz" with many questions of any type (multiple
choice, text input, drag and drop assignment tasks and so on). These
quiz data will be accessed by a eID script which export these data as a
JSON object.
As the View and Controller part is very easy for me, I'm stuck in the
Model part. I'm trying to transport my Flow knowledge to Extbase but had
to learn that some concepts aren't suffer like inheritance of entities.
In Flow you are able to annotate the abstract base entity for
inheritance and use "extend" for the specific entity. But that's not
suitable for Extbase as far as I know. In the documentation on
http://docs.typo3.org/typo3cms/ExtbaseFluidBook/5-Domain/2-implementing-the-domain-model.html#use-inheritance-in-class-hierarchies
is inheritance for ValueObjects described but is it useable for entities
as well?

Or is there another to archieve inheritance in Extbase?

My complete "model" should look like this. Question should be the base
class:

[quiz] <--1:n--> [question] <|------ [multiplechoiceQuestion] <-- 1:n --> [multiplechoiceAnswer]
                      ^  ^---------- [textinputQuestion]
                      +------------- [assignmentQuestion] <-- 1:n --> [assignmentAnswer]


I really hope i could explain what I want to archieve.

Thanks for your help!
Steffen




More information about the TYPO3-dev mailing list