Pull merge.
[yaffs-website] / web / core / modules / node / tests / modules / node_test_exception / node_test_exception.module
1 <?php
2
3 /**
4  * @file
5  * A module implementing node related hooks to test API interaction.
6  */
7
8 use Drupal\node\NodeInterface;
9
10 /**
11  * Implements hook_ENTITY_TYPE_insert() for node entities.
12  */
13 function node_test_exception_node_insert(NodeInterface $node) {
14   if ($node->getTitle() == 'testing_transaction_exception') {
15     throw new Exception('Test exception for rollback.');
16   }
17 }