[TYPO3-dev] Repository class not injected correctly

Ivano Luberti luberti at archicoop.it
Sun Aug 3 23:03:45 CEST 2014


I don't think it really matters: what is important is to have the getter
and setter method named correctly so if you have . Ayway use

$forums

For clairty matters: you have to write two methods

getForums()

and setForums()

commented accordingly of course.

About Extensionn Builder not modifying model.....if it was a matter of
rights you should see some error messages. So I don't think this is the
case.
Try looking at

\DH\Forum\Configuration\ExtensionBuilder\settings.yaml

read the comment at the beginning  of the files for explanation.

Another possibility is that you have modified manually something and now
there is incoherence between all the files content and the mapping built
by Extension Builder in:

\DH\Forum\ExtensionBuilder.json

In this case if you want to keep using Extension Builder for this
project and it would be be better to rebuild the model from scratch and
then import the code modifications you have made.

Good luck! :-)




Il 03/08/2014 20:51, Dirk Ho ha scritto:
> I'm very sorry for asking again:
>
> @var
> \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DH\Forum\Domain\Model\Forum>
>
> What's the name of the variable?
> $forum?
> $forums?
>
> I don't know if in this case a plural "s" is added to the variable
> name or if just the singular of the model is used.
>
> Am 02.08.2014 22:55, schrieb Ivano Luberti:
>> For what I see in the comment of $category declaration you have:
>>
>>>       * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<>
>>
>> but you should have
>>
>>>       * @var \DH\Forum\Domain\Model\Category >
>>
>> because a forum can have only one category
>>
>> While in CategoryModel you should have
>>
>>>       * @var
>>> \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DH\Forum\Domain\Model\Forum
>>>
>>>>
>>
>> to list all forums for a given Cateogry
>>
>> if you don't specify the type Extbase cannot determine it.
>>
>>
>> I think that for initial development you should use Extension Builder:
>> it generates automatically this kind of things and you could learn a lot
>> browsing the code.
>> Roundtripping  can be cumbersome expecially once you start editing
>> templates, typoscript and other configuration fields but the initial
>> development works well especially for newbies.
>>
>>
>
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
>

-- 
==================================================
dott. Ivano Mario Luberti
Archimede Informatica societa' cooperativa a r. l.
Sede Operativa
Via Gereschi 36 - 56126- Pisa
tel.: +39-050- 580959
tel/fax: +39-050-9711344
web: www.archicoop.it
==================================================




More information about the TYPO3-dev mailing list