1d632c713c5bcd117c83576ac48e32c21eb87e9e
[yaffs-website] / update_test_1.install
1 <?php
2
3 /**
4  * @file
5  * Install, update and uninstall functions for the update_test_1 module.
6  */
7
8 /**
9  * Implements hook_update_dependencies().
10  *
11  * @see update_test_2_update_dependencies()
12  */
13 function update_test_1_update_dependencies() {
14   \Drupal::state()->set('update_test_1_update_dependencies_run', TRUE);
15   // These dependencies are used in combination with those declared in
16   // update_test_2_update_dependencies() for the sole purpose of testing that
17   // the results of hook_update_dependencies() are collected correctly and have
18   // the correct array structure. Therefore, we use updates from the
19   // update_test_0 module (which will be installed first) that they will not
20   // get in the way of other tests.
21   $dependencies['update_test_0'][8001] = [
22     // Compare to update_test_2_update_dependencies(), where the same
23     // update_test_0 module update function is forced to depend on an update
24     // function from a different module. This allows us to test that both
25     // dependencies are correctly recorded.
26     'update_test_1' => 8001,
27   ];
28   $dependencies['update_test_0'][8002] = [
29     // Compare to update_test_2_update_dependencies(), where the same
30     // update_test_0 module update function is forced to depend on a
31     // different update function within the same module. This allows us to
32     // test that only the dependency on the higher-numbered update function
33     // is recorded.
34     'update_test_1' => 8003,
35   ];
36   return $dependencies;
37 }
38
39 /**
40  * Dummy update_test_1 update 8001.
41  */
42 function update_test_1_update_8001() {
43 }
44
45 /**
46  * Dummy update_test_1 update 8002.
47  */
48 function update_test_1_update_8002() {
49 }
50
51 /**
52  * Dummy update_test_1 update 8003.
53  */
54 function update_test_1_update_8003() {
55 }