I would like to create page nodes programmatically, i.e. using a CommandController.
I already created page nodes successfully like this:
$this->nodeOperations->create($parentNode, [
'nodeType' => 'My.Vendor:SomePage',
'properties' => [
'title' => 'Example',
'otherProperty' => 'something'
],
], 'into');
My questions are:
- Is this “the right” way or is there some kind of official API for this?
- I have one content dimension (language) and I would like to create a translation of my created node. How can I do this?