Act on a newly created node.
This hook runs after a new node object has just been instantiated. It can be used to set initial values, e.g. to provide defaults.
\Drupal\Core\Entity\EntityInterface $node: The node object.
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
function hook_node_create(\Drupal\Core\Entity\EntityInterface $node) {
if (!isset($node->foo)) {
$node->foo = 'some_initial_value';
}
}