Version 1
[yaffs-website] / web / core / modules / config / tests / config_test / src / ConfigTestStorage.php
1 <?php
2
3 namespace Drupal\config_test;
4
5 use Drupal\Core\Config\Entity\ConfigEntityStorage;
6 use Drupal\Core\Config\Config;
7
8 /**
9  * @todo.
10  */
11 class ConfigTestStorage extends ConfigEntityStorage {
12
13   /**
14    * {@inheritdoc}
15    */
16   public function importCreate($name, Config $new_config, Config $old_config) {
17     // Set a global value we can check in test code.
18     $GLOBALS['hook_config_import'] = __METHOD__;
19
20     return parent::importCreate($name, $new_config, $old_config);
21   }
22
23   /**
24    * {@inheritdoc}
25    */
26   public function importUpdate($name, Config $new_config, Config $old_config) {
27     // Set a global value we can check in test code.
28     $GLOBALS['hook_config_import'] = __METHOD__;
29
30     return parent::importUpdate($name, $new_config, $old_config);
31   }
32
33   /**
34    * {@inheritdoc}
35    */
36   public function importDelete($name, Config $new_config, Config $old_config) {
37     // Set a global value we can check in test code.
38     $GLOBALS['hook_config_import'] = __METHOD__;
39
40     return parent::importDelete($name, $new_config, $old_config);
41   }
42
43 }