Drupal 8.7.2
function mymodule_node_presave(Drupal\Core\Entity\EntityInterface $entity) {
data_dump($entity->original); //is empty because its a new node, not a node being updated.
// How to get all values at one time?
// By values I mean the same value you would get from:
data_dump($entity->get('title')->value);
// but from all fields and not just one field at a time.
}
I have a custom content type that has 30 custom fields that I need to examine inside this hook. I'd like to avoid getting the value of each field individually.
Thank you for your time.