nloyola Posted November 26, 2021 Share Posted November 26, 2021 I want to add a FieldtypeRepeater and I want the repeater to contain a FieldtypePage. Do I have to create the FieldtypePage in separate migration? The reason is In the FieldtypeRepeater I have to give the id of the FieldtypePage in the "repeaterFields" property. If I do it in a single migration, the FieldtypePage does not yet have an id. What is the best way to do this? Link to comment Share on other sites More sharing options...
bernhard Posted November 26, 2021 Share Posted November 26, 2021 $rm = $modules->get('RockMigrations'); $rm->createField('demo_page', 'page', [ ... ]) $rm->createField('demo_repeater', 'repeater', [ 'repeaterFields' => [ 'demo_page', ], ]); Something like that? Link to comment Share on other sites More sharing options...
nloyola Posted November 27, 2021 Author Share Posted November 27, 2021 Thank you. Yes, that works. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now