Jump to content

Recommended Posts

Posted

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?

Posted
$rm = $modules->get('RockMigrations');
$rm->createField('demo_page', 'page', [
	...
])
$rm->createField('demo_repeater', 'repeater', [
	'repeaterFields' => [
		'demo_page',
	],
]);

Something like that?

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...