Skip to content
Snippets Groups Projects
Commit 74043679 authored by jrockowitz's avatar jrockowitz
Browse files

Adjust 'Generate content' for mercury editor.

parent c86766e8
No related branches found
No related tags found
No related merge requests found
Pipeline #285730 passed with warnings
......@@ -133,13 +133,13 @@ class SchemaDotOrgDevelGenerate implements SchemaDotOrgDevelGenerateInterface {
}
}
// Alter the Mercury Editor form.
// Alter the Mercury Editor form for new nodes.
if (str_ends_with($form_id, 'mercury_editor_form')) {
/** @var \Drupal\mercury_editor\Entity\MercuryEditorNodeForm $form_object */
$form_object = $form_state->getFormObject();
/** @var \Drupal\node\NodeInterface $node */
$node = $form_object->getEntity();
if ($node->isNew()) {
$url = Url::fromRoute('node.add', ['node_type' => $node->bundle()]);
$query = $this->request()->query->all();
if ($this->isDevelGenerateRequest()) {
......@@ -162,6 +162,7 @@ class SchemaDotOrgDevelGenerate implements SchemaDotOrgDevelGenerateInterface {
];
}
}
}
/**
* Form element #after_build callback: Change the moderation state to published.
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment