5 * A module implementing node related hooks to test API interaction.
8 use Drupal\node\NodeInterface;
11 * Implements hook_ENTITY_TYPE_insert() for node entities.
13 function node_test_exception_node_insert(NodeInterface $node) {
14 if ($node->getTitle() == 'testing_transaction_exception') {
15 throw new Exception('Test exception for rollback.');