public function QuickNodeCloneNodeController::cloneNode in Quick Node Clone 8
Provides the node submission form.
Parameters
\Drupal\node\Entity\Node $node: The node entity to clone.
Return value
array A node submission form.
1 string reference to 'QuickNodeCloneNodeController::cloneNode'
File
- src/
Controller/ QuickNodeCloneNodeController.php, line 74
Class
- QuickNodeCloneNodeController
- Returns responses for Quick Node Clone Node routes.
Namespace
Drupal\quick_node_clone\ControllerCode
public function cloneNode(Node $node) {
if (!empty($node)) {
$form = $this
->entityFormBuilder()
->getForm($node, 'quick_node_clone');
return $form;
}
else {
throw new NotFoundHttpException();
}
}