How know inside hook_entity_presave() if it's a create or update? How know inside hook_entity_presave() if the entity is create or update please ?
Thanks.

Note: I want use presave and not update and insert hook.
Like this:

if ($node-&gt;isNew()) {

}


Note that this only works before saving, in insert/update, it will always return TRUE, because the node has already been saved and is no longer new.