You are here

function hook_cloned_node_alter in Quick Node Clone 8

Called when a node is cloned.

Parameters

\Drupal\node\NodeInterface $node: The node being cloned.

1 invocation of hook_cloned_node_alter()
QuickNodeCloneEntityFormBuilder::getForm in src/Entity/QuickNodeCloneEntityFormBuilder.php
Gets the built and processed entity form for the given entity.

File

./quick_node_clone.api.php, line 14
Hooks related to quick_node_clone module and it's plugins.

Code

function hook_cloned_node_alter(\Drupal\node\NodeInterface &$node) {
  $node
    ->setTitle('Old node cloned');
  $node
    ->save();
}