[TYPO3-mvc] T3 6.1 Injection of Repository mapped to FE_User not working

Till Wimmer g4-lisz at tonarchiv.ch
Wed Dec 18 16:54:27 CET 2013


Hi Ludwig

Thanks for your help!

When I get the repository manually as you did propose, it works. I.e. the
repository seems to be ok, but injection does not work...

Now I run into the next problem:

$this->portalUserRepository->find(One)ByCustomer($customer) doesn't return
anything. $customer is initalized correctly.

The only method which returns a result is findByUid().

In the ext_tables.php, customer has been added to fe_user:

$tmp_stdapp_columns = array(

        'customer' => array(
                'exclude' => 0,
                'label' =>
'LLL:EXT:stdapp/Resources/Private/Language/locallang_db.xlf:tx_stdapp_domain_model_portaluser.customer',
                'config' => array(
                        'type' => 'inline',
                        'foreign_table' => 'tx_stdapp_domain_model_customer',
                        'minitems' => 0,
                        'maxitems' => 1,
                        'appearance' => array(
                                'collapseAll' => 0,
                                'levelLinksPosition' => 'top',
                                'showSynchronizationLink' => 1,
                                'showPossibleLocalizationRecords' => 1,
                                'showAllLocalizationLink' => 1
                        ),
                ),
        ),
);

t3lib_extMgm::addTCAcolumns('fe_users',$tmp_stdapp_columns);

Is there something wron with this, or is this a specail issue with fe_users?

Regards,
Till

On Wed, December 18, 2013 09:58, Ludwig Rafelsberger wrote:
> Am Tue, 17 Dec 2013 23:28:05 +0100
> schrieb g4-lisz at tonarchiv.ch:
>
> Hi Till,
>
> Does your PortalUser have a valid property customer?
>
> Then: What happens if you explicitely create the Repository object
> (remove the @inject, insert something like
> $this->portalUserRepository =
> $this->objectManager->get('\\GK\\Stdapp\\Domain\\Repository\\PortalUserRepository');
> into the initializeObject() method? Could you …::var_dump() the result
> to check if it is there?
>
> Besides, I assume "ext_typoscritp_setup.txt" is a typo only in the mail…
>
> Cheers,
> Ludwig
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc




More information about the TYPO3-project-typo3v4mvc mailing list