TYPO3 / How to make repository from existing table fe_users?

前端 未结 2 1469
醉话见心
醉话见心 2020-12-18 06:51

I am creating a special BE module with Extbase and Fluid and I need a domain object which would be representing standard FE user. When I create new domain object called e.g.

2条回答
  •  星月不相逢
    2020-12-18 07:00

    For Extbase 6.X

    You need to give class like \TYPO3\CMS\Extbase\Domain\Model\FrontendUser instead of Tx_Extbase_Domain_Repository_FrontendUserRepository in Extend existing model class field inside extension builder

    After that you can have control of fe_users inside your model....

    Also add file ext_typoscript_setup.txt in root of your extension(added automatically if generated via extension_builder)

    config.tx_extbase{
        persistence{
            classes{
    
                TYPO3\CMS\Extbase\Domain\Model\FrontendUser {
                    subclasses {
                        Tx_Extendfeuser_Extended = Model_class_with_namespace
                        
                    }
                }
                Vendor\EXt\Domain\Model\Extended {
                    mapping {
                        tableName = fe_users
                        recordType = Tx_Extendfeuser_Extended
                    }
                }
                
            }
        }
    }
    

    Thanks!!!

    Works with TYPO3 7.6.X as well

提交回复
热议问题