Builds the node form.
bool $embedded: (Optional) Whether the embedded form should be used or not.
protected function buildNodeForm($embedded = FALSE) {
if ($embedded) {
$this->formObject = new TestEmbeddedEntityForm($this->node);
}
else {
$this->formObject = $this->entityTypeManager
->getFormObject('node', 'default');
$this->formObject
->setEntity($this->node);
}
$this->formState = (new FormState())
->disableRedirect()
->setFormObject($this->formObject);
$this->form = $this->formBuilder
->buildForm($this->formObject, $this->formState);
$this
->reassignEntities();
}