[TYPO3-mvc] How to extend and treat Tx_Extbase_Domain_Model_FrontendUserGroup in m:n relation

Martin Kokeš shr3k at typo3-hosting.com
Wed Feb 8 11:16:16 CET 2012

Hello list,

I have following simple Extbase Domain Model:
Project <projectLayers(m:n)> Layer <frontendUserGroups(m:n)> FrontendUserGroup

Object FrontendUserGroup is simply extension of Tx_Extbase_Domain_Model_FrontendUserGroup with no additional functionality or fields:
class Tx_Example_Domain_Model_FrontendUserGroup extends Tx_Extbase_Domain_Model_FrontendUserGroup {


In the backend I can assign multiple Layer objects to my Project and multiple FrontendUserGroup to Layer.
The object named Layer has some more unimportant n:1 relations that simply work as they should.
Even relation projectLayers works as it should.

In the frontend I have List and Show templates for Project.
Show Project template prints out the object's properties and includes a <f:for each="{project.projectLayers}" as="layer"></f:for> statement for list of assigned Layer objects.

My problem is that I can successfully print out every property and relation of Layer, except layer.frontendUserGroups.
I'd like to work with layer.frontendUserGroups for simply showing and hiding some parts of generated code with help of FED:
<fed:auth.allow frontendUserGroups="{layer.frontendUserGroups}" then="allowed" else="denied"/>

Debug shows me for layer.frontendUserGroups:
Tx_Extbase_Persistence_ObjectStorage Object
    [warning:Tx_Extbase_Persistence_ObjectStorage:private] => You should never see this warning...
    [storage:protected] => Array

    [isModified:protected] =>

Simple function with $this->frontendUserGroups->count() is everytime 0, although in the backend I have assigned multiple groups to multiple layers.

plugin.tx_example.persistence.storagePid is set to my General Storage Folder, where are all other records as Project, Layer etc.
All my fe_users are set to Tx_Extbase_Domain_Model_FrontendUser.
All my fe_groups are set to Tx_Extbase_Domain_Model_FrontendUserGroup.

Can anyone kick me right way please or navigate me to working example or extension with working Tx_Extbase_Domain_Model_FrontendUserGroup m:n relation?

Thank you


More information about the TYPO3-project-typo3v4mvc mailing list